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)
globals->sync_period.tv_nsec = (double)
(sync_period - (int) sync_period) * 1e9;
(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;
- return -1;
You only close sock_mc on errors but not sock?
And please chose something better  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 ...