##// END OF EJS Templates
chg: remove sockdirfd...
Jun Wu -
r30676:b83bddfc default
parent child Browse files
Show More
@@ -35,22 +35,16 b' struct cmdserveropts {'
35 char redirectsockname[UNIX_PATH_MAX];
35 char redirectsockname[UNIX_PATH_MAX];
36 size_t argsize;
36 size_t argsize;
37 const char **args;
37 const char **args;
38 int sockdirfd;
39 };
38 };
40
39
41 static void initcmdserveropts(struct cmdserveropts *opts) {
40 static void initcmdserveropts(struct cmdserveropts *opts) {
42 memset(opts, 0, sizeof(struct cmdserveropts));
41 memset(opts, 0, sizeof(struct cmdserveropts));
43 opts->sockdirfd = -1;
44 }
42 }
45
43
46 static void freecmdserveropts(struct cmdserveropts *opts) {
44 static void freecmdserveropts(struct cmdserveropts *opts) {
47 free(opts->args);
45 free(opts->args);
48 opts->args = NULL;
46 opts->args = NULL;
49 opts->argsize = 0;
47 opts->argsize = 0;
50 if (opts->sockdirfd >= 0) {
51 close(opts->sockdirfd);
52 opts->sockdirfd = -1;
53 }
54 }
48 }
55
49
56 /*
50 /*
General Comments 0
You need to be logged in to leave comments. Login now