From: Ralph Corderoy Date: Sun, 30 Oct 2016 15:09:55 +0000 (+0000) Subject: Replace strlen(foo) > 0 with *foo. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/eda0cc87eedfbbe5a15a91a59489e31f69e30998?ds=inline;hp=9a8baf1f7ee48005ea447725589fceb5717ad32b Replace strlen(foo) > 0 with *foo. --- diff --git a/uip/post.c b/uip/post.c index fca85f7b..bf1c042d 100644 --- a/uip/post.c +++ b/uip/post.c @@ -1041,7 +1041,7 @@ putfmt (char *name, char *str, int *eai, FILE *out) * Strip off any trailing newlines */ - while (strlen(fullfrom) > 0 && fullfrom[strlen(fullfrom) - 1] == '\n') { + while (*fullfrom && fullfrom[strlen(fullfrom) - 1] == '\n') { fullfrom[strlen(fullfrom) - 1] = '\0'; } }