Date: Fri, 22 Dec 95 10:09:00 W From: Angelo Turetta <turetta@trust.stylo.it> To: freebsd-hackers <freebsd-hackers@freebsd.org>, "'SMTP:tsingle@sunland.gsfc.nasa.gov'" <tsingle@sunland.gsfc.nasa.gov> Subject: Re: semctl() portability issue and fix Message-ID: <30DA75B4@trust.stylo.it>
next in thread | raw e-mail | index | archive | help
As Tim Singletary wrote: > if (cmd == IPC_SET || cmd == IPC_STAT || cmd == GETALL > || cmd == SETVAL || cmd == SETALL) { > fourth_arg = va_arg(ap, union semun); > fourth_arg_ptr = &fourth_arg; > } > fourth_arg_ptr = NULL; > va_end(ap); > > return (semsys(0, semid, semnum, cmd, fourth_arg_ptr)); Probably a typo, but it seems to me fourth_arg_ptr will always be NULL upon call to semsys. Better to put an 'else' before it (or at least move assignment BEFORE the if statement ) :-) :-) Angelo. <aturetta@stylo.it>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?30DA75B4>