On Sun, Feb 06, 2011 at 12:42:31AM +0200, Mikolaj Golub wrote: [...] > PJD> + /* > PJD> + * At this point descriptor to syslog socket is closed, so if > we want > PJD> + * to log assertion message, we have to first store it in > 'msg' local > PJD> + * buffer and then open syslog socket and log it. > PJD> + */ > PJD> + msg[0] = '\0'; > PJD> + > PJD> + maxfd = sysconf(_SC_OPEN_MAX); > PJD> + if (maxfd < 0) { > PJD> + pjdlog_errno(LOG_WARNING, "sysconf(_SC_OPEN_MAX) > failed"); > > As it is commented above :-) syslog socket is closed so we can't call > pjdlog_errno() here.
Correct. Fix committed. > PJD> + } else { > PJD> + isopen = true; /* silence gcc */ > PJD> + mode = 0; /* silence gcc */ > PJD> + snprintf(msg, sizeof(msg), > PJD> + "Unable to fstat descriptor %d: %s", fd, > PJD> + strerror(errno)); > > Shouldn't it break here? Yes, I think we should. My initial idea it seems was that it isn't fatal error, but it becomes messy, as we will eventually overwrite msg buffer, so I added break there. Thanks! -- Pawel Jakub Dawidek http://www.wheelsystems.com p...@freebsd.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am!
pgpdL7WofUq49.pgp
Description: PGP signature