# HG changeset patch # User Matti Hamalainen # Date 1518015769 -7200 # Node ID 58fe784a6e48bfea3d38d40ade0293565e21ac30 # Parent 27365eae837b684ff0fb7e73809af7905f76b734 Cleanups. diff -r 27365eae837b -r 58fe784a6e48 sidinfo.c --- 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);