On Friday 16 January 2009 09:53, Christoph Mallon wrote: > > int > > main() { > > > > int mib[4]; > > > > size_t len; > > > > if (sysctlnametomib("kern.ipc.shmmax", mib, &len) != 0) { > > printf("Errno: %d\n", errno); > > errx(errno, "Error: %s", strerror(errno)); > > The use of errno is wrong. printf might change errno.
I don't think printf() can set errno. And even if it could, it wouldn't matter, because C has call-by-value semantics. Christian _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"