From aae3071b0dd52d5b24ffde0a850b3c6f941ccb04 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 19 May 2015 11:59:59 +0200 Subject: keep integer value of priority --- journal-notify.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/journal-notify.c b/journal-notify.c index 81aea75..d05cd9d 100644 --- a/journal-notify.c +++ b/journal-notify.c @@ -74,9 +74,9 @@ int main(int argc, char **argv) { char * identifier, * message, * identifier_markup, * message_markup; + uint8_t priority, urgency; const char * icon = DEFAULTICON; int timeout = -1; - uint8_t urgency; program = argv[0]; @@ -240,7 +240,8 @@ int main(int argc, char **argv) { fprintf(stderr, "Failed to read syslog identifier field: %s\n", strerror(-rc)); continue; } - switch(atoi(data + 9)) { + priority = atoi(data + 9); + switch(priority) { case 0: case 1: case 2: -- cgit v1.2.3-70-g09d2