Mercurial > hg > sidinfo
diff sidinfo.c @ 161:58fe784a6e48
Cleanups.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 07 Feb 2018 17:02:49 +0200 |
parents | a8c24f1f460f |
children | 179ffe97599c |
line wrap: on
line diff
--- a/sidinfo.c Mon Feb 05 00:59:58 2018 +0200 +++ b/sidinfo.c Wed Feb 07 17:02:49 2018 +0200 @@ -966,19 +966,20 @@ if (optOneLine) { + // For one-line format, disable parsing and prefixes optParsable = FALSE; optNoNamePrefix = TRUE; } - if (optFieldOutput && !optFormat.nitems) + if (optFieldOutput && optFormat.nitems == 0) { + // For standard field output, push standard items to format stack PSFStackItem item; - int i; memset(&item, 0, sizeof(item)); siClearStack(&optFormat); - for (i = 0; i < noptPSOptions; i++) + for (int i = 0; i < noptPSOptions; i++) { item.cmd = i; siStackAddItem(&optFormat, &item);