Patchwork [2,of,3] chg: remove sockdirfd

login
register
mail settings
Submitter Jun Wu
Date Dec. 23, 2016, 4:46 p.m.
Message ID <95f0c3df6e09f0110a36.1482511609@x1c>
Download mbox | patch
Permalink /patch/18018/
State Accepted
Headers show

Comments

Jun Wu - Dec. 23, 2016, 4:46 p.m.
# HG changeset patch
# User Jun Wu <quark@fb.com>
# Date 1482509804 0
#      Fri Dec 23 16:16:44 2016 +0000
# Node ID 95f0c3df6e09f0110a365643511c271a8029f5bc
# Parent  68566eb02a680d9a67fff8eb9ae3eab77872f886
# Available At https://bitbucket.org/quark-zju/hg-draft
#              hg pull https://bitbucket.org/quark-zju/hg-draft -r 95f0c3df6e09
chg: remove sockdirfd

See the previous patch for the reason.

Patch

diff --git a/contrib/chg/chg.c b/contrib/chg/chg.c
--- a/contrib/chg/chg.c
+++ b/contrib/chg/chg.c
@@ -36,10 +36,8 @@  struct cmdserveropts {
 	size_t argsize;
 	const char **args;
-	int sockdirfd;
 };
 
 static void initcmdserveropts(struct cmdserveropts *opts) {
 	memset(opts, 0, sizeof(struct cmdserveropts));
-	opts->sockdirfd = -1;
 }
 
@@ -48,8 +46,4 @@  static void freecmdserveropts(struct cmd
 	opts->args = NULL;
 	opts->argsize = 0;
-	if (opts->sockdirfd >= 0) {
-		close(opts->sockdirfd);
-		opts->sockdirfd = -1;
-	}
 }