summaryrefslogtreecommitdiffstats
path: root/htop.c
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-09-21 15:06:19 +0200
committercgzones <cgzones@googlemail.com>2020-10-03 19:04:27 +0200
commitb82a13c6ba48eb8711071342bec80798aca5de1c (patch)
tree5c004cde48dea9c71e1ff665a159b15b37be172e /htop.c
parentd69585b82abfdaede9e8c358982a4953c432e8d2 (diff)
Add clang analyzer CI job
Diffstat (limited to 'htop.c')
-rw-r--r--htop.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/htop.c b/htop.c
index fbd6dee4..5054379d 100644
--- a/htop.c
+++ b/htop.c
@@ -107,6 +107,7 @@ static CommandLineSettings parseArguments(int argc, char** argv) {
printVersionFlag();
exit(0);
case 's':
+ assert(optarg); /* please clang analyzer, cause optarg can be NULL in the 'u' case */
if (strcmp(optarg, "help") == 0) {
for (int j = 1; j < Platform_numberOfFields; j++) {
const char* name = Process_fields[j].name;
@@ -158,6 +159,7 @@ static CommandLineSettings parseArguments(int argc, char** argv) {
flags.treeView = true;
break;
case 'p': {
+ assert(optarg); /* please clang analyzer, cause optarg can be NULL in the 'u' case */
char* argCopy = xStrdup(optarg);
char* saveptr;
char* pid = strtok_r(argCopy, ",", &saveptr);

© 2014-2024 Faster IT GmbH | imprint | privacy policy