[ulogd2 PATCH 3/5] ulogd: fix order of log arguments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If `daemon` fails during start-up, ulogd attempts to print `errno` and
`strerror(errno)` to the log.  However, the arguments are the wrong way
round.  Swap them.

Signed-off-by: Jeremy Sowden <jeremy@xxxxxxxxxx>
---
 src/ulogd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ulogd.c b/src/ulogd.c
index a31b35592a87..97da4fc0018f 100644
--- a/src/ulogd.c
+++ b/src/ulogd.c
@@ -1569,7 +1569,7 @@ int main(int argc, char* argv[])
 	if (daemonize){
 		if (daemon(0, 0) < 0) {
 			ulogd_log(ULOGD_FATAL, "can't daemonize: %s (%d)\n",
-				  errno, strerror(errno));
+				  strerror(errno), errno);
 			warn_and_exit(daemonize);
 		}
 	}
-- 
2.33.0




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux