Fix core.UndefinedBinaryOperatorResult warning from scan-build
task-manager-linux.c:362:19: warning: The left operand of '==' is a garbage value [core.UndefinedBinaryOperatorResult] 362 | return (state[0] == 'T') ? TRUE : FALSE; scan-build 17.0.6
This commit is contained in:
@@ -346,7 +346,7 @@ pid_is_sleeping (GPid pid)
|
|||||||
FILE *file;
|
FILE *file;
|
||||||
gchar filename[96];
|
gchar filename[96];
|
||||||
gchar buffer[1024];
|
gchar buffer[1024];
|
||||||
gchar state[2];
|
gchar state[2] = { 0 };
|
||||||
|
|
||||||
snprintf (filename, sizeof (filename), "/proc/%i/status", pid);
|
snprintf (filename, sizeof (filename), "/proc/%i/status", pid);
|
||||||
if ((file = fopen (filename, "r")) == NULL)
|
if ((file = fopen (filename, "r")) == NULL)
|
||||||
|
|||||||
Reference in New Issue
Block a user