Mercurial > hg > sidinfo
changeset 161:58fe784a6e48
Cleanups.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 07 Feb 2018 17:02:49 +0200 |
parents | 27365eae837b |
children | 7359170fbb7f |
files | sidinfo.c |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
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);