Date: Mon, 13 Dec 2004 12:37:05 -0500 From: Ken Smith <kensmith@cse.Buffalo.EDU> To: Warner Losh <imp@rover.village.org> Cc: imp@bsdimp.com Subject: Re: cvs commit: src/sbin/ifconfig ifconfig.c src/sys/net if.c if.h Message-ID: <20041213173705.GH1528@electra.cse.Buffalo.EDU> In-Reply-To: <20041213.101932.41697633.imp@harmony.village.org> References: <20041213160418.GB1528@electra.cse.Buffalo.EDU> <20041213.091049.19644100.imp@bsdimp.com> <xzpk6rmywg6.fsf@dwp.des.no> <20041213.101932.41697633.imp@harmony.village.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Dec 13, 2004 at 10:19:32AM -0700, Warner Losh wrote: > From: des@des.no (Dag-Erling Smørgrav) > Subject: Re: cvs commit: src/sbin/ifconfig ifconfig.c src/sys/net if.c if.h > Date: Mon, 13 Dec 2004 17:50:01 +0100 > > > "M. Warner Losh" <imp@bsdimp.com> writes: > > > Ken Smith <kensmith@cse.Buffalo.EDU> writes: > > > > int main(void) > > > int main(int argc, char *argv[]) > > > > Both are correct according to the standard. > > The latter is what style(9) implies is the right one for FreeBSD. > Ok, two revisions (and at least two pointy hats) later, modulo above comment about what style(9) suggests (this is just a quick little test program so since we've got no intention of using the command line arguments one could argue less typing is better :-) we have this. Thanks to a few other people who have contributed substantially off-list. :-) #include <stdio.h> #include <stdlib.h> #include <stddef.h> #include <sys/param.h> #include <sys/socket.h> #include "if.h" int main(void) { printf("sizeof if_data %zd\n", sizeof(struct if_data)); printf("offset ifi_mtu %zd\n", offsetof(struct if_data, ifi_mtu)); } -- Ken Smith - From there to here, from here to | kensmith@cse.buffalo.edu there, funny things are everywhere. | - Theodore Geisel |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041213173705.GH1528>