1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-22 19:45:54 -04:00

Use null check convention in notifier.c

This commit is contained in:
James Booth 2015-05-04 23:06:35 +01:00
parent aefe458b60
commit dda812cd3e

View File

@ -89,7 +89,7 @@ notify_invite(const char * const from, const char * const room,
g_string_append(message, from);
g_string_append(message, "\nto: ");
g_string_append(message, room);
if (reason != NULL) {
if (reason) {
g_string_append_printf(message, "\n\"%s\"", reason);
}
@ -103,7 +103,7 @@ notify_message(const char * const handle, int win, const char * const text)
{
GString *message = g_string_new("");
g_string_append_printf(message, "%s (win %d)", handle, win);
if (text != NULL) {
if (text) {
g_string_append_printf(message, "\n%s", text);
}
@ -117,7 +117,7 @@ notify_room_message(const char * const handle, const char * const room, int win,
{
GString *message = g_string_new("");
g_string_append_printf(message, "%s in %s (win %d)", handle, room, win);
if (text != NULL) {
if (text) {
g_string_append_printf(message, "\n%s", text);
}
@ -274,7 +274,7 @@ _notify(const char * const message, int timeout,
app_id = "com.googlecode.iterm2";
}
if (app_id != NULL) {
if (app_id) {
g_string_append(notify_command, " -sender ");
g_string_append(notify_command, app_id);
}