aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2015-03-20 11:09:47 +0100
committerGravatar Christian Hesse <mail@eworm.de>2015-03-20 11:09:47 +0100
commit5d06cc4834d3bf7b1431973617aaea5cc0c9498a (patch)
tree2ae4f29967dd049d72a4058cf4c5965f478d851c
parent713a2907c5f6712a4d425f636017e700e33d114f (diff)
downloadmpd-notification-5d06cc4834d3bf7b1431973617aaea5cc0c9498a.tar.gz
mpd-notification-5d06cc4834d3bf7b1431973617aaea5cc0c9498a.tar.zst
check for correct return code
-rw-r--r--mpd-notification.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mpd-notification.c b/mpd-notification.c
index 16d4076..1a7dec2 100644
--- a/mpd-notification.c
+++ b/mpd-notification.c
@@ -44,7 +44,7 @@ void received_signal(int signal) {
if (verbose > 0)
printf("Received signal %s, showing last notification again.\n", strsignal(signal));
- if (!notify_notification_show(notification, &error)) {
+ if (notify_notification_show(notification, &error) == FALSE) {
g_printerr("%s: Error \"%s\" while trying to show notification again.\n", program, error->message);
g_error_free(error);
}
@@ -172,7 +172,7 @@ int main(int argc, char ** argv) {
exit(EXIT_FAILURE);
}
- if(!notify_init(PROGNAME)) {
+ if(notify_init(PROGNAME) == FALSE) {
fprintf(stderr, "%s: Can't create notify.\n", program);
exit(EXIT_FAILURE);
}
@@ -240,7 +240,7 @@ int main(int argc, char ** argv) {
notify_notification_set_timeout(notification, NOTIFICATION_TIMEOUT);
- while(!notify_notification_show(notification, &error)) {
+ while(notify_notification_show(notification, &error) == FALSE) {
if (errcount > 1) {
fprintf(stderr, "%s: Looks like we can not reconnect to notification daemon... Exiting.\n", program);
exit(EXIT_FAILURE);
@@ -255,7 +255,7 @@ int main(int argc, char ** argv) {
usleep(500 * 1000);
- if(!notify_init(PROGNAME)) {
+ if(notify_init(PROGNAME) == FALSE) {
fprintf(stderr, "%s: Can't create notify.\n", program);
exit(EXIT_FAILURE);
}