diff options
author | Mike Yuan <me@yhndnzj.com> | 2023-12-25 10:34:57 +0100 |
---|---|---|
committer | Mike Yuan <me@yhndnzj.com> | 2023-12-25 10:47:18 +0100 |
commit | 2413a0fab4fdad7eef3ce1d4b57664be5795b002 (patch) | |
tree | e7a21c95fa93122312f4243b211e668ca11a2cdf /src/creds | |
parent | siphash24: introduce siphash24_compress_typesafe() macro (diff) | |
download | systemd-2413a0fab4fdad7eef3ce1d4b57664be5795b002.tar.xz systemd-2413a0fab4fdad7eef3ce1d4b57664be5795b002.zip |
format-table: introduce table_isempty and use it where appropriate
Diffstat (limited to 'src/creds')
-rw-r--r-- | src/creds/creds.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/creds/creds.c b/src/creds/creds.c index b53e8d3b36..ed39ffe51e 100644 --- a/src/creds/creds.c +++ b/src/creds/creds.c @@ -232,7 +232,7 @@ static int verb_list(int argc, char **argv, void *userdata) { return log_error_errno(SYNTHETIC_ERRNO(ENXIO), "No credentials passed. (i.e. $CREDENTIALS_DIRECTORY not set.)"); } - if ((arg_json_format_flags & JSON_FORMAT_OFF) && table_get_rows(t) <= 1) { + if (FLAGS_SET(arg_json_format_flags, JSON_FORMAT_OFF) && table_isempty(t)) { log_info("No credentials"); return 0; } |