chg: remove sockdirfd
authorJun Wu <quark@fb.com>
Fri, 23 Dec 2016 16:16:44 +0000
changeset 30676 b83bddfc8048
parent 30675 112915e9a363
child 30677 c80c16a8a0b0
chg: remove sockdirfd See the previous patch for the reason.
contrib/chg/chg.c
--- a/contrib/chg/chg.c	Fri Dec 23 16:37:00 2016 +0000
+++ b/contrib/chg/chg.c	Fri Dec 23 16:16:44 2016 +0000
@@ -35,22 +35,16 @@
 	char redirectsockname[UNIX_PATH_MAX];
 	size_t argsize;
 	const char **args;
-	int sockdirfd;
 };
 
 static void initcmdserveropts(struct cmdserveropts *opts) {
 	memset(opts, 0, sizeof(struct cmdserveropts));
-	opts->sockdirfd = -1;
 }
 
 static void freecmdserveropts(struct cmdserveropts *opts) {
 	free(opts->args);
 	opts->args = NULL;
 	opts->argsize = 0;
-	if (opts->sockdirfd >= 0) {
-		close(opts->sockdirfd);
-		opts->sockdirfd = -1;
-	}
 }
 
 /*