summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2018-01-02 12:36:29 +0100
committerPablo Barciela <[email protected]>2018-01-02 12:36:29 +0100
commit64d47ad9e43da564ea4c2b2ae2dd4b1ca22a8770 (patch)
treeb0c8c546c311cfde837511100cc9a369a902738d /src
parent663b2f1eb9c20af84448f2266a88a724a00bd224 (diff)
downloadmate-screensaver-64d47ad9e43da564ea4c2b2ae2dd4b1ca22a8770.tar.bz2
mate-screensaver-64d47ad9e43da564ea4c2b2ae2dd4b1ca22a8770.tar.xz
gs-lock-plug.c: Fix build warning:
ignoring return value of ‘fscanf’, declared with attribute warn_unused_result
Diffstat (limited to 'src')
-rw-r--r--src/gs-lock-plug.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gs-lock-plug.c b/src/gs-lock-plug.c
index 4069b11..07993c5 100644
--- a/src/gs-lock-plug.c
+++ b/src/gs-lock-plug.c
@@ -190,7 +190,10 @@ process_is_running (const char * name)
int num_processes;
gchar *command = g_strdup_printf ("pidof %s | wc -l", name);
FILE *fp = popen(command, "r");
- fscanf(fp, "%d", &num_processes);
+
+ if (fscanf(fp, "%d", &num_processes) != 1)
+ num_processes = 0;
+
pclose(fp);
g_free (command);