public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Simon Wunderlich <sw@simonwunderlich.de>
To: b.a.t.m.a.n@lists.open-mesh.org,
	Jonathan Haws <Jonathan.Haws@sdl.usu.edu>
Subject: Re: [B.A.T.M.A.N.] [PATCH v4] alfred: IPv4 multicast distribution support.
Date: Tue, 24 Jan 2017 17:09:39 +0100	[thread overview]
Message-ID: <1860403.1ETbzszp8C@prime> (raw)
In-Reply-To: <1485272132.2398.4.camel@sdl.usu.edu>

[-- Attachment #1: Type: text/plain, Size: 1773 bytes --]

On Tuesday, January 24, 2017 3:35:33 PM CET Jonathan Haws wrote:
> > > @@ -273,10 +276,15 @@ static struct globals *alfred_init(int argc,
> > > char *argv[])
> > >  			return NULL;
> > >  		case 'p':
> > >  			sync_period = strtod(optarg, NULL);
> > > -			globals->sync_period.tv_sec = (int)
> > > sync_period;
> > > -			globals->sync_period.tv_nsec = (double)
> > > (sync_period - (int) sync_period) * 1e9;
> > > +			globals->sync_period.tv_sec =
> > > (int)sync_period;
> > > +			globals->sync_period.tv_nsec =
> > > (double)(sync_period - (int)sync_period) * 1e9;
> > >  			printf(" ** Setting sync interval to: %.9f
> > > seconds (%ld.%09ld)\n", sync_period, globals->sync_period.tv_sec,
> > > globals->sync_period.tv_nsec);
> > >  			break;
> > 
> > This doesn't seem to belong in this patch.
> 
> 
> Yes, that is correct.  I must have fixed that formatting when I was
> going through everything else.  Would you like me to take it out of
> this patch?

Yes, format fixes should go into format fix patches preferably, not into 
patches adding functions. :)

>[...]
> > > 
> > > +
> > > +	interface->netsock = sock;
> > > +	interface->netsock_mcast = sock_mc;
> > > +
> > > +	return 0;
> > > +err4:
> > > +	close(sock_mc);
> > > +	return -1;
> > > +}
> > > +
> > 
> > You only close sock_mc on errors but not sock?
> > 
> > And please chose something better [1] than err4.
> 
> 
> I see why you'd want me to rename the goto - however it was chosen to
> differentiate between the err goto in netsock_open.  I called it err4
> since it is for the netsock_open4() function dealing with IPv4.  Would
> err_ipv4 be better?

Why not just using err? Since its a different function, I don't see why not 
re-using the label. Actually I would prefer that ...

Cheers,
     Simon

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2017-01-24 16:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-20  4:01 [B.A.T.M.A.N.] [PATCH v4] alfred: IPv4 multicast distribution support Jonathan Haws
2017-01-20  4:04 ` Jonathan Haws
2017-01-24 11:44 ` Simon Wunderlich
2017-01-24 15:45   ` Jonathan Haws
2017-01-24 16:05     ` Simon Wunderlich
2017-01-24 16:07       ` Jonathan Haws
2017-01-24 13:05 ` Sven Eckelmann
2017-01-24 15:35   ` Jonathan Haws
2017-01-24 16:09     ` Simon Wunderlich [this message]
2017-01-24 16:19     ` Sven Eckelmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1860403.1ETbzszp8C@prime \
    --to=sw@simonwunderlich.de \
    --cc=Jonathan.Haws@sdl.usu.edu \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox