commit | b733b3c7b0601326801d43f548aa139ca0be721e | [log] [tgz] |
---|---|---|
author | Colin Cross <ccross@android.com> | Fri May 16 00:07:06 2014 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Fri May 16 00:07:07 2014 +0000 |
tree | 00d37b4a500fca13260636ebd883a9d5c88f2847 | |
parent | cb8ac609ee27a9e5e6e13bc30447ed3a13964ccd [diff] | |
parent | 7b4448de8deaef2512fb0b17a30facc47b2f4a87 [diff] |
Merge "The situation len = 0 and absolute = false need to be handled"
diff --git a/ext4_utils/make_ext4fs.c b/ext4_utils/make_ext4fs.c index b9a24b8..f164883 100644 --- a/ext4_utils/make_ext4fs.c +++ b/ext4_utils/make_ext4fs.c
@@ -427,8 +427,11 @@ int newlen = len; char *ptr; - if (len == 0 && absolute) { - return strdup("/"); + if (len == 0) { + if (absolute) + return strdup("/"); + else + return strdup(""); } if (str[0] != '/' && absolute) {