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:
Gaël Bonithon
2024-05-31 19:50:33 +02:00
parent 293230ffa7
commit b0b11816e3

View File

@@ -346,7 +346,7 @@ pid_is_sleeping (GPid pid)
FILE *file;
gchar filename[96];
gchar buffer[1024];
gchar state[2];
gchar state[2] = { 0 };
snprintf (filename, sizeof (filename), "/proc/%i/status", pid);
if ((file = fopen (filename, "r")) == NULL)