From: florian Date: Mon, 29 May 2017 08:59:42 +0000 (+0000) Subject: clang points out that the first argument to setproctitle is a format X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=86b0f4acd1ab4e5bf46ee81cb1c32e0fde4ccc45;p=openbsd clang points out that the first argument to setproctitle is a format string. Not really an issue since we are eventually passing in a string literal... While here don't set the proctitle for the main process to play nicer with rc.d(8) --- diff --git a/usr.sbin/slaacd/engine.c b/usr.sbin/slaacd/engine.c index 7bbf65f8a36..329e62e91ea 100644 --- a/usr.sbin/slaacd/engine.c +++ b/usr.sbin/slaacd/engine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: engine.c,v 1.26 2017/05/29 08:15:38 florian Exp $ */ +/* $OpenBSD: engine.c,v 1.27 2017/05/29 08:59:42 florian Exp $ */ /* * Copyright (c) 2017 Florian Obser @@ -295,7 +295,7 @@ engine(int debug, int verbose) fatal("chdir(\"/\")"); slaacd_process = PROC_ENGINE; - setproctitle(log_procnames[slaacd_process]); + setproctitle("%s", log_procnames[slaacd_process]); log_procinit(log_procnames[slaacd_process]); if (setgroups(1, &pw->pw_gid) || diff --git a/usr.sbin/slaacd/frontend.c b/usr.sbin/slaacd/frontend.c index 83c28416675..9b90fc3422e 100644 --- a/usr.sbin/slaacd/frontend.c +++ b/usr.sbin/slaacd/frontend.c @@ -1,4 +1,4 @@ -/* $OpenBSD: frontend.c,v 1.12 2017/05/29 07:54:46 florian Exp $ */ +/* $OpenBSD: frontend.c,v 1.13 2017/05/29 08:59:42 florian Exp $ */ /* * Copyright (c) 2017 Florian Obser @@ -132,7 +132,7 @@ frontend(int debug, int verbose, char *sockname) fatal("chdir(\"/\")"); slaacd_process = PROC_FRONTEND; - setproctitle(log_procnames[slaacd_process]); + setproctitle("%s", log_procnames[slaacd_process]); log_procinit(log_procnames[slaacd_process]); if ((icmp6sock = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6)) < 0) diff --git a/usr.sbin/slaacd/slaacd.c b/usr.sbin/slaacd/slaacd.c index 5cf3797fe8f..f1f63882502 100644 --- a/usr.sbin/slaacd/slaacd.c +++ b/usr.sbin/slaacd/slaacd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: slaacd.c,v 1.18 2017/05/28 21:05:54 naddy Exp $ */ +/* $OpenBSD: slaacd.c,v 1.19 2017/05/29 08:59:42 florian Exp $ */ /* * Copyright (c) 2017 Florian Obser @@ -221,7 +221,6 @@ main(int argc, char *argv[]) slaacd_process = PROC_MAIN; - setproctitle(log_procnames[slaacd_process]); log_procinit(log_procnames[slaacd_process]); if ((routesock = socket(PF_ROUTE, SOCK_RAW | SOCK_CLOEXEC |