about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-05-04 22:57:19 +0100
committerJames Booth <boothj5@gmail.com>2015-05-04 22:57:19 +0100
commitfe216b4e9777abe658c6a24e5c5faf5247e4b74d (patch)
tree5634db0d3ce373d9213ed17b2639973e0096a0e2 /src
parentfa2e33e11d45e3df363da2c4ca3b2a6137f955df (diff)
downloadprofani-tty-fe216b4e9777abe658c6a24e5c5faf5247e4b74d.tar.gz
Use null check convention in parser.c
Diffstat (limited to 'src')
-rw-r--r--src/tools/parser.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tools/parser.c b/src/tools/parser.c
index 1f8a5220..d3a23264 100644
--- a/src/tools/parser.c
+++ b/src/tools/parser.c
@@ -156,7 +156,7 @@ parse_args(const char * const inp, int min, int max, gboolean *result)
         token = g_slist_next(token);
         int arg_count = 0;
 
-        while (token != NULL) {
+        while (token) {
             args[arg_count++] = strdup(token->data);
             token = g_slist_next(token);
         }
@@ -303,7 +303,7 @@ parse_args_with_freetext(const char * const inp, int min, int max, gboolean *res
         token = g_slist_next(token);
         int arg_count = 0;
 
-        while (token != NULL) {
+        while (token) {
             args[arg_count++] = strdup(token->data);
             token = g_slist_next(token);
         }
@@ -419,7 +419,7 @@ parse_options(gchar **args, gchar **opt_keys, gboolean *res)
         }
 
         // check if duplicate
-        if (g_list_find_custom(found_keys, args[curr], (GCompareFunc)g_strcmp0) != NULL) {
+        if (g_list_find_custom(found_keys, args[curr], (GCompareFunc)g_strcmp0)) {
             *res = FALSE;
             g_list_free(keys);
             return options;
@@ -450,7 +450,7 @@ parse_options(gchar **args, gchar **opt_keys, gboolean *res)
 void
 options_destroy(GHashTable *options)
 {
-    if (options != NULL) {
+    if (options) {
         g_hash_table_destroy(options);
     }
 }