lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1316206180-6375-5-git-send-email-sandeen@redhat.com>
Date:	Fri, 16 Sep 2011 15:49:19 -0500
From:	Eric Sandeen <sandeen@...hat.com>
To:	linux-ext4@...r.kernel.org
Cc:	Eric Sandeen <sandeen@...hat.com>
Subject: [PATCH 04/25] 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 <sandeen@...hat.com>
---
 misc/mke2fs.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index abcfbf0..437b495 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);
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ