diff options
| author | James Booth <boothj5@gmail.com> | 2015-05-04 23:40:58 +0100 |
|---|---|---|
| committer | James Booth <boothj5@gmail.com> | 2015-05-04 23:40:58 +0100 |
| commit | 3fd9692aecf190d079b119f66e046c8ed9013031 (patch) | |
| tree | f2688404a0b898365d1e9e26f4c8f1335ca134b8 /src/tools | |
| parent | 176fba84a04d8c0864b57feb848cccfe5c4814e3 (diff) | |
| parent | 6f3750c6aa1ba72378ac004e6abceb19ed1ddecb (diff) | |
| download | profani-tty-3fd9692aecf190d079b119f66e046c8ed9013031.tar.gz | |
Merge branch 'master' into pgp
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/parser.c | 8 | ||||
| -rw-r--r-- | src/tools/tinyurl.c | 2 |
2 files changed, 5 insertions, 5 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); } } diff --git a/src/tools/tinyurl.c b/src/tools/tinyurl.c index 34e8967a..92ff97b8 100644 --- a/src/tools/tinyurl.c +++ b/src/tools/tinyurl.c @@ -74,7 +74,7 @@ tinyurl_get(char *url) g_string_free(full_url, TRUE); - if (output.buffer != NULL) { + if (output.buffer) { output.buffer[output.size++] = '\0'; return output.buffer; } else { |