summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorEric Koegel <eric.koegel@gmail.com>2017-05-14 05:21:16 +0300
committerEric Koegel <eric.koegel@gmail.com>2017-05-21 02:00:02 +0300
commitc08e4b40db50d1eb8f013ee28eb3fb6c866b8505 (patch)
tree1f263e2ffacf4803bb4a58ccd0eae1570bde7b44 /src/main.c
parentbf990a165f87089b2bd5194b832cbc089bceb5c4 (diff)
downloadConsoleKit2-c08e4b40db50d1eb8f013ee28eb3fb6c866b8505.tar.gz
fix: remove the rest of the gcc warnings
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 5c3b487..e4bef7c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -48,9 +48,9 @@ static GMainLoop *loop = NULL;
static gboolean
-timed_exit_cb (GMainLoop *loop)
+timed_exit_cb (GMainLoop *l)
{
- g_main_loop_quit (loop);
+ g_main_loop_quit (l);
return FALSE;
}
@@ -200,7 +200,7 @@ create_pid_file (void)
if ((pf = open (CONSOLE_KIT_PID_FILE, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL, 0644)) >= 0) {
snprintf (pid, sizeof (pid), "%lu\n", (long unsigned) getpid ());
written = write (pf, pid, strlen (pid));
- if (written != strlen(pid)) {
+ if (written < 1 || (size_t)written != strlen(pid)) {
g_warning ("unable to write pid file %s: %s",
CONSOLE_KIT_PID_FILE,
g_strerror (errno));