Date: Wed, 20 Jun 2007 11:41:36 GMT From: Fredrik Lindberg <fli@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 122030 for review Message-ID: <200706201141.l5KBfaTi055694@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=122030 Change 122030 by fli@fli_genesis on 2007/06/20 11:40:44 Remove the totally useless iov-dance (what was I thinking?) and replace it with ONE fprintf-call :) Affected files ... .. //depot/projects/soc2007/fli-mdns_sd/mdnsd/log.c#3 edit Differences ... ==== //depot/projects/soc2007/fli-mdns_sd/mdnsd/log.c#3 (text+ko) ==== @@ -44,23 +44,14 @@ #endif static void -dolog(int priority, const char *message) +dolog(int priority, char *message) { - struct iovec iov[4]; if (_isdaemon) { syslog(priority, message); } else { - iov[0].iov_base = (char *)_pname; - iov[0].iov_len = strlen(_pname); - iov[1].iov_base = ": "; - iov[1].iov_len = 2; - iov[2].iov_base = (char *)message; - iov[2].iov_len = strlen(message); - iov[3].iov_base = "\n"; - iov[3].iov_len = 1; - writev(STDERR_FILENO, iov, 4); + fprintf(stderr, "%s: %s\n", _pname, message); } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200706201141.l5KBfaTi055694>