From: Eric Sandeen Date: Fri, 16 Sep 2011 20:49:19 +0000 (-0500) Subject: mke2fs: remove impossible tests for null usage_types X-Git-Tag: v1.42-WIP-0925~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d5cf8b166bb29f0e3280bbadca9d3a8b895acd1;p=thirdparty%2Fe2fsprogs.git mke2fs: remove impossible tests for null usage_types parse_fs_type explicitly sets usage_types if it is null, so there is no need to test for null later. Signed-off-by: Eric Sandeen Signed-off-by: Theodore Ts'o --- diff --git a/misc/mke2fs.c b/misc/mke2fs.c index abcfbf022..437b4955d 100644 --- a/misc/mke2fs.c +++ b/misc/mke2fs.c @@ -1029,15 +1029,12 @@ static char **parse_fs_type(const char *fs_type, if (!usage_types) usage_types = size_type; - parse_str = malloc(usage_types ? strlen(usage_types)+1 : 1); + parse_str = malloc(strlen(usage_types)+1); if (!parse_str) { free(list.list); return 0; } - if (usage_types) - strcpy(parse_str, usage_types); - else - *parse_str = '\0'; + strcpy(parse_str, usage_types); if (ext_type) push_string(&list, ext_type);