diff options
author | 2012-06-19 17:43:40 +0000 | |
---|---|---|
committer | 2012-06-19 17:43:40 +0000 | |
commit | 1600e3c25136e10afba4be3463150bcb588f0f5a (patch) | |
tree | ce7ba72b43d226792644c5c3a7d0277ea906471e | |
parent | simplify includes prereq/req order: (diff) | |
download | wireguard-openbsd-1600e3c25136e10afba4be3463150bcb588f0f5a.tar.xz wireguard-openbsd-1600e3c25136e10afba4be3463150bcb588f0f5a.zip |
use warn() instead of perror(), like the rest of the code does
from Liam J. Foy
-rw-r--r-- | libexec/spamd/spamd.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libexec/spamd/spamd.c b/libexec/spamd/spamd.c index 8744ef127c3..740b9039ee4 100644 --- a/libexec/spamd/spamd.c +++ b/libexec/spamd/spamd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spamd.c,v 1.111 2012/04/19 19:11:55 deraadt Exp $ */ +/* $OpenBSD: spamd.c,v 1.112 2012/06/19 17:43:40 deraadt Exp $ */ /* * Copyright (c) 2002-2007 Bob Beck. All rights reserved. @@ -273,7 +273,7 @@ parse_configs(void) tmp = realloc(cb, cbs + 8192); if (tmp == NULL) { if (debug > 0) - perror("malloc()"); + warn("realloc"); free(cb); cb = NULL; cbs = cbu = 0; @@ -313,7 +313,7 @@ do_config(void) tmp = realloc(cb, cbs + 8192); if (tmp == NULL) { if (debug > 0) - perror("malloc()"); + warn("realloc"); free(cb); cb = NULL; cbs = 0; @@ -331,7 +331,7 @@ do_config(void) goto configdone; } else if (n == -1) { if (debug > 0) - perror("read()"); + warn("read"); goto configdone; } else cbu += n; @@ -955,7 +955,7 @@ handler(struct con *cp) closecon(cp); else if (n == -1) { if (debug > 0) - perror("read()"); + warn("read"); closecon(cp); } else { cp->ip[n] = '\0'; @@ -995,7 +995,7 @@ handlew(struct con *cp, int one) goto handled; } else if (n == -1) { if (debug > 0 && errno != EPIPE) - perror("write()"); + warn("write"); closecon(cp); goto handled; } @@ -1009,7 +1009,7 @@ handlew(struct con *cp, int one) closecon(cp); else if (n == -1) { if (debug > 0 && errno != EPIPE) - perror("write()"); + warn("write"); closecon(cp); } else { cp->op += n; |