Skip to content

Commit

Permalink
connector/local: cleanup
Browse files Browse the repository at this point in the history
Eliminate dead code for constructing path to broker.pid file.
  • Loading branch information
garlick committed Mar 2, 2017
1 parent 158c5ae commit 1191f6e
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/connectors/local/local.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
Expand Down

0 comments on commit 1191f6e

Please sign in to comment.