##// END OF EJS Templates
chg: wrap line at 80 chars...
Jun Wu -
r28790:b0cc9652 default
parent child Browse files
Show More
@@ -72,11 +72,14 static size_t testsensitiveflag(const ch
72 72 size_t len = strlen(flags[i].name);
73 73 size_t narg = flags[i].narg;
74 74 if (memcmp(arg, flags[i].name, len) == 0) {
75 if (arg[len] == '\0') { /* --flag (value) */
75 if (arg[len] == '\0') {
76 /* --flag (value) */
76 77 return narg + 1;
77 } else if (arg[len] == '=' && narg > 0) { /* --flag=value */
78 } else if (arg[len] == '=' && narg > 0) {
79 /* --flag=value */
78 80 return 1;
79 } else if (flags[i].name[1] != '-') { /* short flag */
81 } else if (flags[i].name[1] != '-') {
82 /* short flag */
80 83 return 1;
81 84 }
82 85 }
@@ -163,7 +166,8 static void setcmdserveropts(struct cmds
163 166 static void lockcmdserver(struct cmdserveropts *opts)
164 167 {
165 168 if (opts->lockfd == -1) {
166 opts->lockfd = open(opts->lockfile, O_RDWR | O_CREAT | O_NOFOLLOW, 0600);
169 opts->lockfd = open(opts->lockfile,
170 O_RDWR | O_CREAT | O_NOFOLLOW, 0600);
167 171 if (opts->lockfd == -1)
168 172 abortmsgerrno("cannot create lock file %s",
169 173 opts->lockfile);
General Comments 0
You need to be logged in to leave comments. Login now