fix: nread is unsigned
@@ -81,7 +81,7 @@ static void show_process(pid_t pid)
}
size_t nread = fread(cmdline, 1, sizeof(cmdline), f);
fclose(f);
- if (nread <= 0) {
+ if (nread == 0) {
fprintf(stderr, "Error: failed to read from %s: %s\n", proc_file, strerror(errno));
exit(EXIT_FAILURE);
}
