PERFORCE change 122030 for review
Fredrik Lindberg
fli at FreeBSD.org
Wed Jun 20 11:41:37 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=122030
Change 122030 by fli at 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);
}
}
More information about the p4-projects
mailing list