a248769183
- Summary of important changes from upstream: - add support for a new Linux-specific GPT partition type code - partprobe: remove partitions when there is no partition table - libparted: refactor device-mapper partition sync code - libparted: remove extraneous blkpg add partition ped exception - libparted: don't probe every dm device in probe_all - New Fedora changes: - libparted: Add Intel Rapid Start Technology partition flag. - libparted: Add UEFI System Partition flag. - libparted: Add hfs_esp partition flag to GPT. - libparted: Recognize btrfs filesystem - tests: Add btrfs and xfs to the fs probe test
32 lines
907 B
Diff
32 lines
907 B
Diff
From 464c0f9ae4af8346cd494c6434f4addabdd76e9d Mon Sep 17 00:00:00 2001
|
|
From: Jim Meyering <meyering@redhat.com>
|
|
Date: Tue, 11 Sep 2012 17:22:52 +0200
|
|
Subject: [PATCH 19/69] maint: remove unnecessary wcslen use
|
|
|
|
* parted/strlist.c (gettext_to_wchar): Tighten up test for
|
|
mbsrtowcs failure and remove unnecessary wcslen use.
|
|
---
|
|
parted/strlist.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/parted/strlist.c b/parted/strlist.c
|
|
index d34fb56..1f90c0e 100644
|
|
--- a/parted/strlist.c
|
|
+++ b/parted/strlist.c
|
|
@@ -112,10 +112,10 @@ gettext_to_wchar (const char* str)
|
|
|
|
memset(&ps, 0, sizeof (ps));
|
|
status = mbsrtowcs(result, &str, count, &ps);
|
|
- if (status == (size_t) -1)
|
|
+ if (str != NULL)
|
|
goto error;
|
|
|
|
- result = xrealloc (result, (wcslen (result) + 1) * sizeof (wchar_t));
|
|
+ result = xrealloc (result, (status + 1) * sizeof (wchar_t));
|
|
return result;
|
|
|
|
error:
|
|
--
|
|
1.8.3.1
|
|
|