From 9ab4e79503911a15b6eee5a0ba4920872637e7b4 Mon Sep 17 00:00:00 2001 From: Alcaro Date: Thu, 2 Jun 2016 21:02:28 +0200 Subject: [PATCH] Simplify these checks a little. --- list_special.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/list_special.c b/list_special.c index 43a2d808a0..5d87992ca4 100644 --- a/list_special.c +++ b/list_special.c @@ -242,14 +242,13 @@ struct string_list *string_list_new_special(enum string_list_type type, for (i = 0; i < *list_size; i++) { - const char *opt = NULL; const core_info_t *info = (const core_info_t*)&core_info[i]; - opt = info ? info->path : NULL; + const char *opt = info->path; if (!opt) goto error; - *len += strlen(opt) + 1; + *len += strlen(opt) + 1; string_list_append(s, opt, attr); } break;