for (np = m_defs; np; np = np->n_next) {
/* Yes, this is O(N^2). The profile should be small enough so
that's not a performance problem. */
- if (strlen (np->n_name) > 0 && strcmp ("#", np->n_name)) {
+ if (*np->n_name && strcmp("#", np->n_name)) {
struct node *np2;
for (np2 = np->n_next; np2; np2 = np2->n_next) {
if (! strcasecmp (np->n_name, np2->n_name)) {
if ((cp = *ap + strlen (*ap) - 1) > *ap && *cp == ':')
*cp = 0;
- if (strlen (*ap) == 0)
+ if (!**ap)
adios (NULL, "null component name");
if (**ap == '-')
adios (NULL, "invalid component name %s", *ap);
fflush(stdout);
code = geta();
- while (strlen(code) == 0 ||
+ while (!*code || ||
((cred = mh_oauth_authorize(code, ctx)) == NULL
&& mh_oauth_get_err_code(ctx) == MH_OAUTH_BAD_GRANT)) {
- printf(strlen(code) == 0 ? "Empty code; try again? " : "Code rejected; try again? ");
+ printf(!*code ? "Empty code; try again? " : "Code rejected; try again? ");
fflush(stdout);
code = geta();
}
fmt_scan (c1->c_fmt, scanl, BUFSIZ - 1, dat, NULL);
buffer = charstring_buffer_copy (scanl);
- if (strlen (buffer) > 0) {
+ if (*buffer) {
if (c2->c_text)
c2->c_text = add (",\n", c2->c_text);
if (*(cp = buffer + strlen (buffer) - 1) == '\n')
char *hostformat = "%(host{Envelope-From})";
if ((*addr = get_message_header_info (in, addrformat)) == NULL ||
- strlen (*addr) == 0) {
+ !**addr) {
addrformat = distfile == NULL ? "%(addr{Sender})" : "%(addr{Resent-Sender})";
hostformat = distfile == NULL ? "%(host{Sender})" : "%(host{Resent-Sender})";
/* Trim trailing newline, if any. */
retval = rtrim(charstring_buffer_copy((buffer)));
charstring_free(buffer);
- if (strlen (retval) > 0) {
+ if (*retval)
return retval;
- } else {
- free (retval);
- return NULL;
- }
+
+ free(retval);
+ return NULL;
}
}
/* Use argsplit() to do the real work of splitting the args in the profile entry. */
- if (profile_entry && strlen(profile_entry) > 0) {
+ if (profile_entry && *profile_entry) {
int profile_vecp;
char *file;
char **profile_vec = argsplit(profile_entry, &file, &profile_vecp);