summaryrefslogtreecommitdiffstats
path: root/sbin/casperd
diff options
context:
space:
mode:
authoraraujo <araujo@FreeBSD.org>2015-07-04 17:38:56 +0000
committeraraujo <araujo@FreeBSD.org>2015-07-04 17:38:56 +0000
commitb3145369510fe53cf9fec393cef3674218687e82 (patch)
treea9c540c3c022b8d6d97e7429f177d45c15a4119c /sbin/casperd
parent26ad2548c054cc37c6ddc74541aa34fafd0c532b (diff)
downloadFreeBSD-src-b3145369510fe53cf9fec393cef3674218687e82.zip
FreeBSD-src-b3145369510fe53cf9fec393cef3674218687e82.tar.gz
Remove unused variable flags reported by clang. The function zygote_clone()
always receive the flags with value 0 and this flags is never checked on zygote_main(). Differential Revision: D2689 Reviewed by: rodrigc, oshogbo
Diffstat (limited to 'sbin/casperd')
-rw-r--r--sbin/casperd/casperd.c2
-rw-r--r--sbin/casperd/zygote.c6
-rw-r--r--sbin/casperd/zygote.h2
3 files changed, 4 insertions, 6 deletions
diff --git a/sbin/casperd/casperd.c b/sbin/casperd/casperd.c
index 7277b98..e9a4a94 100644
--- a/sbin/casperd/casperd.c
+++ b/sbin/casperd/casperd.c
@@ -253,7 +253,7 @@ casper_command(const char *cmd, const nvlist_t *limits, nvlist_t *nvlin,
return (error);
}
- if (zygote_clone(service_external_execute, 0, &chanfd, &procfd) == -1) {
+ if (zygote_clone(service_external_execute, &chanfd, &procfd) == -1) {
error = errno;
close(execfd);
return (error);
diff --git a/sbin/casperd/zygote.c b/sbin/casperd/zygote.c
index 2e17f91..5bc9396 100644
--- a/sbin/casperd/zygote.c
+++ b/sbin/casperd/zygote.c
@@ -77,7 +77,7 @@ stdnull(void)
}
int
-zygote_clone(zygote_func_t *func, int flags, int *chanfdp, int *procfdp)
+zygote_clone(zygote_func_t *func, int *chanfdp, int *procfdp)
{
nvlist_t *nvl;
int error;
@@ -90,7 +90,6 @@ zygote_clone(zygote_func_t *func, int flags, int *chanfdp, int *procfdp)
nvl = nvlist_create(0);
nvlist_add_number(nvl, "func", (uint64_t)(uintptr_t)func);
- nvlist_add_number(nvl, "flags", (uint64_t)flags);
nvl = nvlist_xfer(zygote_sock, nvl, 0);
if (nvl == NULL)
return (-1);
@@ -117,7 +116,7 @@ zygote_clone(zygote_func_t *func, int flags, int *chanfdp, int *procfdp)
static void
zygote_main(int sock)
{
- int error, fd, flags, procfd;
+ int error, fd, procfd;
int chanfd[2];
nvlist_t *nvlin, *nvlout;
zygote_func_t *func;
@@ -144,7 +143,6 @@ zygote_main(int sock)
}
func = (zygote_func_t *)(uintptr_t)nvlist_get_number(nvlin,
"func");
- flags = (int)nvlist_get_number(nvlin, "flags");
nvlist_destroy(nvlin);
/*
diff --git a/sbin/casperd/zygote.h b/sbin/casperd/zygote.h
index 75ef2ef..4c9c771 100644
--- a/sbin/casperd/zygote.h
+++ b/sbin/casperd/zygote.h
@@ -35,6 +35,6 @@
typedef void zygote_func_t(int);
int zygote_init(void);
-int zygote_clone(zygote_func_t *func, int flags, int *chanfdp, int *procfdp);
+int zygote_clone(zygote_func_t *func, int *chanfdp, int *procfdp);
#endif /* !_ZYGOTE_H_ */
OpenPOWER on IntegriCloud