diff options
author | Eric Koegel <eric.koegel@gmail.com> | 2017-05-14 05:21:16 +0300 |
---|---|---|
committer | Eric Koegel <eric.koegel@gmail.com> | 2017-05-21 02:00:02 +0300 |
commit | c08e4b40db50d1eb8f013ee28eb3fb6c866b8505 (patch) | |
tree | 1f263e2ffacf4803bb4a58ccd0eae1570bde7b44 /src/main.c | |
parent | bf990a165f87089b2bd5194b832cbc089bceb5c4 (diff) | |
download | ConsoleKit2-c08e4b40db50d1eb8f013ee28eb3fb6c866b8505.tar.gz |
fix: remove the rest of the gcc warnings
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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)); |