diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2022-10-10 15:17:38 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2022-10-10 15:17:38 +0000 |
| commit | 807e19385480696ce9fbd8dbdee946df224eaddf (patch) | |
| tree | 97bca1e71c5a4b2d06c03d0948d319b48a465ebd /utils/xtgettcap.c | |
| parent | install.md: add `./utils/xtgettcap name` to "full PGO" instructions too (diff) | |
xtgettcap: exit immediately when there are no capabilities to query for
Diffstat (limited to 'utils/xtgettcap.c')
| -rw-r--r-- | utils/xtgettcap.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/utils/xtgettcap.c b/utils/xtgettcap.c index e21de7c0..b3ab712a 100644 --- a/utils/xtgettcap.c +++ b/utils/xtgettcap.c @@ -67,10 +67,13 @@ unhexlify(char *dst, const char *src) int main(int argc, const char *const *argv) { - enable_raw_mode(); - const size_t query_count = argc - 1; + if (query_count == 0) + return 0; + + enable_raw_mode(); + printf("\x1bP+q"); for (int i = 1; i < argc; i++) printf("%s%s", i > 1 ? ";" : "", hexlify(argv[i])); |
