diff options
author | Roy Marples <roy@marples.name> | 2009-04-30 19:56:43 +0100 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2009-04-30 19:56:43 +0100 |
commit | 3d0e5175d845c2386295cf454f9ee1939265fe59 (patch) | |
tree | ab5fd50b99e05e3aaca755aaffaa8b0c0e52ba5a /src/rc/start-stop-daemon.c | |
parent | 21e45e895ce3ca586e0c5fd89a68b84c01d270de (diff) |
Avoid more gcc warning about not checking return values ...
Diffstat (limited to 'src/rc/start-stop-daemon.c')
-rw-r--r-- | src/rc/start-stop-daemon.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rc/start-stop-daemon.c b/src/rc/start-stop-daemon.c index 8237e1e8..1952154a 100644 --- a/src/rc/start-stop-daemon.c +++ b/src/rc/start-stop-daemon.c @@ -960,9 +960,9 @@ start_stop_daemon(int argc, char **argv) if (interpreted && !pidfile) { fp = fopen(exec_file, "r"); if (fp) { - fgets(line, sizeof(line), fp); + p = fgets(line, sizeof(line), fp); fclose(fp); - if (line[0] == '#' && line[1] == '!') { + if (p != NULL && line[0] == '#' && line[1] == '!') { p = line + 2; /* Strip leading spaces */ while (*p == ' ' || *p == '\t') |