From 1191f6e868c1658de94b57b7c44c834fc6b23a77 Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Thu, 2 Mar 2017 15:31:30 +0000 Subject: [PATCH] connector/local: cleanup Eliminate dead code for constructing path to broker.pid file. --- src/connectors/local/local.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/connectors/local/local.c b/src/connectors/local/local.c index 898b56df0ea7..b9b4208e0ce9 100644 --- a/src/connectors/local/local.c +++ b/src/connectors/local/local.c @@ -169,14 +169,12 @@ static int env_getint (char *name, int dflt) return s ? strtol (s, NULL, 10) : dflt; } -/* Path is interpreted as the directory containing the unix domain socket - * and broker pid. +/* Path is interpreted as the directory containing the unix domain socket. */ flux_t *connector_init (const char *path, int flags) { local_ctx_t *c = NULL; struct sockaddr_un addr; - char pidfile[PATH_MAX + 1]; char sockfile[PATH_MAX + 1]; int n, count; @@ -189,12 +187,6 @@ flux_t *connector_init (const char *path, int flags) errno = EINVAL; goto error; } - n = snprintf (pidfile, sizeof (pidfile), "%s/broker.pid", path); - if (n >= sizeof (pidfile)) { - errno = EINVAL; - goto error; - } - if (!(c = malloc (sizeof (*c)))) { errno = ENOMEM; goto error;