aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-07-28 17:53:51 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-07-28 17:53:51 +0200
commitc964e3dbc6f1157e609c7ba3f4bfa1d73045253f (patch)
treeb18f6406a447464ed265efcbe0ca9a34e2d97369
parent17976348d132990fbcbcc5eda3f7f4bf005d3a7f (diff)
downloadmblaze-c964e3dbc6f1157e609c7ba3f4bfa1d73045253f.tar.gz
mpick: style
-rw-r--r--mpick.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/mpick.c b/mpick.c
index 56b4200..60eacbe 100644
--- a/mpick.c
+++ b/mpick.c
@@ -695,7 +695,7 @@ parse_msglist(const char *s)
expr = chain(parse_expr("from.addr == 's'"), EXPR_AND, expr);
}
}
- return NULL;
+ return 0;
}
time_t
@@ -714,7 +714,7 @@ msg_date(struct mailinfo *m)
char *
msg_subject(struct mailinfo *m)
{
- if (*m->subject != '\0')
+ if (!*m->subject)
return m->subject;
char *b;
@@ -751,12 +751,12 @@ eval(struct expr *e, struct mailinfo *m)
case EXPR_ANYSET: {
long v = 0;
- if (m->sb == '\0' && (
+ if (!m->sb && (
e->a.prop == PROP_ATIME ||
e->a.prop == PROP_CTIME ||
e->a.prop == PROP_MTIME ||
e->a.prop == PROP_SIZE) &&
- (m->sb = calloc(1, sizeof *m->sb)) != NULL &&
+ (m->sb = calloc(1, sizeof *m->sb)) &&
stat(m->fpath, m->sb) != 0) {
fprintf(stderr, "stat");
exit(2);
@@ -1024,10 +1024,10 @@ main(int argc, char *argv[])
for (c = optind; c < argc; c++)
expr = chain(expr, EXPR_AND, parse_msglist(argv[c]));
- if (isatty(0)) {
+ if (isatty(0))
i = blaze822_loop1(":", need_thr ? collect : oneline);
- } else
- i = blaze822_loop(0, NULL, need_thr ? collect : oneline);
+ else
+ i = blaze822_loop(0, 0, need_thr ? collect : oneline);
/* print and free last thread */
if (Tflag && thr)