Only true of simple if-else rather than a chain.
37 files changed:
if ((mypath = getenv("HOME")) == NULL) {
if ((pw = getpwuid(getuid())) == NULL || *pw->pw_dir == '\0')
adios(NULL, "cannot determine your home directory");
if ((mypath = getenv("HOME")) == NULL) {
if ((pw = getpwuid(getuid())) == NULL || *pw->pw_dir == '\0')
adios(NULL, "cannot determine your home directory");
- else
- mypath = pw->pw_dir;
sigprocmask (SIG_BLOCK, &set, &oset);
if (!(out = lkfopendata (ctxpath, "w", &failed_to_lock))) {
sigprocmask (SIG_BLOCK, &set, &oset);
if (!(out = lkfopendata (ctxpath, "w", &failed_to_lock))) {
adios (ctxpath, "failed to lock");
adios (ctxpath, "failed to lock");
- } else {
- adios (ctxpath, "unable to write");
- }
+ adios (ctxpath, "unable to write");
}
for (np = m_defs; np; np = np->n_next)
if (np->n_context)
}
for (np = m_defs; np; np = np->n_next)
if (np->n_context)
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
- else
- folder = pluspath (cp);
+ folder = pluspath (cp);
} else
app_msgarg(&msgs, cp);
}
} else
app_msgarg(&msgs, cp);
}
}
if (addrp == NADDRS)
adios (NULL, "more than %d addresses", NADDRS);
}
if (addrp == NADDRS)
adios (NULL, "more than %d addresses", NADDRS);
- else
- addrs[addrp++] = cp;
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
- else
- folder = pluspath (cp);
+ folder = pluspath (cp);
} else {
app_msgarg(&msgs, cp);
}
} else {
app_msgarg(&msgs, cp);
}
msgp = 1;
find_mime_parts(content, smsgs, &msgp);
free_content(content);
msgp = 1;
find_mime_parts(content, smsgs, &msgp);
free_content(content);
- if (msgp == 1 && *mimesw == 2) {
+ if (msgp == 1 && *mimesw == 2)
adios (msgnam, "does not have any message/rfc822 parts");
adios (msgnam, "does not have any message/rfc822 parts");
*mimesw = 1;
return (msgp - 1);
}
*mimesw = 1;
return (msgp - 1);
}
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
- else
- folder = pluspath (cp);
+ folder = pluspath (cp);
} else {
if (msg)
adios (NULL, "only one message at a time!");
} else {
if (msg)
adios (NULL, "only one message at a time!");
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
- else
- folder = pluspath (cp);
+ folder = pluspath (cp);
} else {
if (msg)
adios (NULL, "only one message at a time!");
} else {
if (msg)
adios (NULL, "only one message at a time!");
}
if (datep == NDATES)
adios (NULL, "more than %d dates", NDATES);
}
if (datep == NDATES)
adios (NULL, "more than %d dates", NDATES);
- else
- dates[datep++] = cp;
}
if (form)
adios (NULL, "only one form at a time!");
}
if (form)
adios (NULL, "only one form at a time!");
if (mode == MESSAGE && !files && (*cp == '+' || *cp == '@')) {
if (folder)
adios (NULL, "only one folder at a time!");
if (mode == MESSAGE && !files && (*cp == '+' || *cp == '@')) {
if (folder)
adios (NULL, "only one folder at a time!");
- else
- folder = pluspath (cp);
+ folder = pluspath (cp);
} else
app_msgarg(&msgs, cp);
}
} else
app_msgarg(&msgs, cp);
}
if (*cp == '+' || *cp == '@') {
if (argfolder)
adios (NULL, "only one folder at a time!");
if (*cp == '+' || *cp == '@') {
if (argfolder)
adios (NULL, "only one folder at a time!");
- else
- argfolder = pluspath (cp);
+ argfolder = pluspath (cp);
} else {
if (msg)
adios (NULL, "only one (current) message at a time!");
} else {
if (msg)
adios (NULL, "only one (current) message at a time!");
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
- else
- folder = pluspath (cp);
+ folder = pluspath (cp);
} else {
app_msgarg(&msgs, cp);
}
} else {
app_msgarg(&msgs, cp);
}
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
- else
- folder = pluspath (cp);
+ folder = pluspath (cp);
} else {
adios (NULL, "usage: %s [+folder] [switches]", invo_name);
}
} else {
adios (NULL, "usage: %s [+folder] [switches]", invo_name);
}
inform("Creating Receive-Audit: %s", audfile);
if ((aud = fopen (audfile, "a")) == NULL)
adios (audfile, "unable to append to");
inform("Creating Receive-Audit: %s", audfile);
if ((aud = fopen (audfile, "a")) == NULL)
adios (audfile, "unable to append to");
chmod (audfile, m_gmprot ());
if (from)
chmod (audfile, m_gmprot ());
if (from)
if ((mypath = getenv("HOME")) == NULL) {
if ((pw = getpwuid(getuid())) == NULL || *pw->pw_dir == '\0')
adios(NULL, "cannot determine your home directory");
if ((mypath = getenv("HOME")) == NULL) {
if ((pw = getpwuid(getuid())) == NULL || *pw->pw_dir == '\0')
adios(NULL, "cannot determine your home directory");
- else
- mypath = pw->pw_dir;
else if (autof)
adios (NULL, "invocation error");
else if (autof)
adios (NULL, "invocation error");
- else
- adios (NULL, "You already have an nmh profile, use an editor to modify it");
+ adios (NULL, "You already have an nmh profile, use an editor to modify it");
if (!autof && read_switch ("Do you want help? ", anoyes)) {
(void)printf(
if (!autof && read_switch ("Do you want help? ", anoyes)) {
(void)printf(
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
- else
- folder = pluspath (cp);
+ folder = pluspath (cp);
if (cp[0] == '-' && cp[1] == '\0') {
if (compfile)
adios (NULL, "cannot specify both standard input and a file");
if (cp[0] == '-' && cp[1] == '\0') {
if (compfile)
adios (NULL, "cannot specify both standard input and a file");
listsw = 0; /* turn off -list if using standard in/out */
verbosw = 0; /* turn off -verbose listings */
break;
listsw = 0; /* turn off -list if using standard in/out */
verbosw = 0; /* turn off -verbose listings */
break;
}
if (compfile)
adios (NULL, "only one composition file allowed");
}
if (compfile)
adios (NULL, "only one composition file allowed");
} else {
if (*++cp == 0)
adios (NULL, "giving up trying to find a unique delimiter string");
} else {
if (*++cp == 0)
adios (NULL, "giving up trying to find a unique delimiter string");
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder per #forw directive");
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder per #forw directive");
- else
- folder = pluspath (cp);
+ folder = pluspath (cp);
adios (NULL, "missing argument to %s", argp[-2]);
}
if (! strncasecmp (cp, "multipart/", 10) ||
adios (NULL, "missing argument to %s", argp[-2]);
}
if (! strncasecmp (cp, "multipart/", 10) ||
- ! strncasecmp (cp, "message/", 8)) {
+ ! strncasecmp (cp, "message/", 8))
adios (NULL, "-fixtype %s not allowed", cp);
adios (NULL, "-fixtype %s not allowed", cp);
- } else if (! strchr (cp, '/')) {
+ if (! strchr (cp, '/'))
adios (NULL, "-fixtype requires type/subtype");
adios (NULL, "-fixtype requires type/subtype");
if (fx.fixtypes == NULL) { fx.fixtypes = svector_create (10); }
svector_push_back (fx.fixtypes, cp);
continue;
if (fx.fixtypes == NULL) { fx.fixtypes = svector_create (10); }
svector_push_back (fx.fixtypes, cp);
continue;
}
}
if (*cp == '+' || *cp == '@') {
}
}
if (*cp == '+' || *cp == '@') {
adios (NULL, "only one folder at a time!");
adios (NULL, "only one folder at a time!");
- } else {
- folder = pluspath (cp);
- }
+ folder = pluspath (cp);
} else {
if (*cp == '/') {
/* Interpret a full path as a filename, not a message. */
} else {
if (*cp == '/') {
/* Interpret a full path as a filename, not a message. */
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
- else
- folder = pluspath (cp);
+ folder = pluspath (cp);
} else
app_msgarg(&msgs, cp);
}
} else
app_msgarg(&msgs, cp);
}
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
- else
- folder = pluspath (cp);
+ folder = pluspath (cp);
} else
app_msgarg(&msgs, cp);
}
} else
app_msgarg(&msgs, cp);
}
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
- else
- folder = pluspath (cp);
+ folder = pluspath (cp);
} else
app_msgarg(&msgs, cp);
}
} else
app_msgarg(&msgs, cp);
}
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
- else
- folder = pluspath (cp);
+ folder = pluspath (cp);
} else
app_msgarg(&msgs, cp);
}
} else
app_msgarg(&msgs, cp);
}
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
- else
- folder = pluspath (cp);
+ folder = pluspath (cp);
} else
app_msgarg(&msgs, cp);
}
} else
app_msgarg(&msgs, cp);
}
adios (NULL, "missing argument to %s", argp[-2]);
if (vecp >= MAXVEC-1)
adios (NULL, "you can only check %d users at a time", MAXVEC-1);
adios (NULL, "missing argument to %s", argp[-2]);
if (vecp >= MAXVEC-1)
adios (NULL, "you can only check %d users at a time", MAXVEC-1);
- else
- user = vec[vecp++] = cp;
+ user = vec[vecp++] = cp;
}
if (vecp >= MAXVEC-1)
adios (NULL, "you can only check %d users at a time", MAXVEC-1);
}
if (vecp >= MAXVEC-1)
adios (NULL, "you can only check %d users at a time", MAXVEC-1);
- else
- vec[vecp++] = cp;
return NULL;
if ((fp = lkfopendata (seqfile, "r", & failed_to_lock)) == NULL) {
return NULL;
if ((fp = lkfopendata (seqfile, "r", & failed_to_lock)) == NULL) {
-
- if (failed_to_lock) {
adios (seqfile, "failed to lock");
adios (seqfile, "failed to lock");
- } else {
- free(seqfile);
- return NULL;
- }
+ free(seqfile);
+ return NULL;
}
/* Use m_getfld2 to scan sequence file */
}
/* Use m_getfld2 to scan sequence file */
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
- else
- folder = pluspath (cp);
+ folder = pluspath (cp);
} else
app_msgarg(&msgs, cp);
}
} else
app_msgarg(&msgs, cp);
}
}
if (msg)
adios (NULL, "only one message at a time!");
}
if (msg)
adios (NULL, "only one message at a time!");
}
if (file)
adios (NULL, "only one file at a time!");
}
if (file)
adios (NULL, "only one file at a time!");
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
- else
- folder = pluspath (cp);
+ folder = pluspath (cp);
} else {
adios (NULL, "usage: %s [+folder] [switches]", invo_name);
}
} else {
adios (NULL, "usage: %s [+folder] [switches]", invo_name);
}
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
- else
- folder = pluspath (cp);
+ folder = pluspath (cp);
} else {
if (msg)
adios (NULL, "only one message at a time!");
} else {
if (msg)
adios (NULL, "only one message at a time!");
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
- else
- folder = pluspath (cp);
+ folder = pluspath (cp);
} else {
adios (NULL, "usage: %s [+folder] [switches]", invo_name);
}
} else {
adios (NULL, "usage: %s [+folder] [switches]", invo_name);
}
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
- else
- folder = pluspath (cp);
+ folder = pluspath (cp);
}
if (!context_find ("path"))
}
if (!context_find ("path"))
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
- else
- folder = pluspath (cp);
+ folder = pluspath (cp);
}
if (!context_find ("path"))
}
if (!context_find ("path"))
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
- else
- folder = pluspath (cp);
+ folder = pluspath (cp);
} else {
if (mode != SHOW)
goto usage;
} else {
if (mode != SHOW)
goto usage;
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
- else
- folder = pluspath (cp);
+ folder = pluspath (cp);
}
if (!context_find ("path"))
}
if (!context_find ("path"))
}
if (drft)
adios (NULL, "only one draft at a time!");
}
if (drft)
adios (NULL, "only one draft at a time!");
}
if ((drft == NULL && (drft = getenv ("mhdraft")) == NULL) || *drft == 0)
}
if ((drft == NULL && (drft = getenv ("mhdraft")) == NULL) || *drft == 0)
}
if (msg)
adios (NULL, "only one draft at a time!");
}
if (msg)
adios (NULL, "only one draft at a time!");
- else
- vec[vecp++] = msg = cp;
+ vec[vecp++] = msg = cp;
}
/* allow Aliasfile: profile entry */
}
/* allow Aliasfile: profile entry */