Mercurial > hg > sidinfo
changeset 118:24583e5ca0b3
Simplify.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 16 Feb 2016 03:57:31 +0200 |
parents | 36552c7d7171 |
children | 431aa2c00c45 |
files | sidinfo.c |
diffstat | 1 files changed, 11 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/sidinfo.c Mon Feb 15 15:24:17 2016 +0200 +++ b/sidinfo.c Tue Feb 16 03:57:31 2016 +0200 @@ -227,16 +227,19 @@ th_strndup_trim(start, end - start, TH_TRIM_BOTH) : th_strdup_trim(start, TH_TRIM_BOTH); - int found = argMatchPSFieldError(field); - th_free(field); + if (field != NULL) + { + int found = argMatchPSFieldError(field); + th_free(field); - if (found < 0) - return FALSE; + if (found < 0) + return FALSE; - item.cmd = found; - item.str = NULL; - if (!siStackAddItem(stack, &item)) - return FALSE; + item.cmd = found; + item.str = NULL; + if (!siStackAddItem(stack, &item)) + return FALSE; + } if (!end) break;