FYI, two tiny patches: >From 464c0f9ae4af8346cd494c6434f4addabdd76e9d Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyer...@redhat.com> Date: Tue, 11 Sep 2012 17:22:52 +0200 Subject: [PATCH 1/2] 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.7.12.363.g53284de >From 1d67e37ef257d3d3847126f3b899b8b0e11aa186 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyer...@redhat.com> Date: Wed, 12 Sep 2012 10:02:46 +0200 Subject: [PATCH 2/2] tests: clarify a comment: _reading_ gpt tables on tiny devices * tests/t0203-gpt-tiny-device-abort.sh: Clarify. --- tests/t0203-gpt-tiny-device-abort.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/t0203-gpt-tiny-device-abort.sh b/tests/t0203-gpt-tiny-device-abort.sh index 7283c55..bf281ff 100644 --- a/tests/t0203-gpt-tiny-device-abort.sh +++ b/tests/t0203-gpt-tiny-device-abort.sh @@ -1,6 +1,6 @@ #!/bin/sh -# parted before 3.1 could abort for a pathologically small device with -# a valid primary GPT header but no room for the backup header. +# parted before 3.1 could abort while reading a pathologically small device +# with a valid primary GPT header but no room for the backup header. # Copyright (C) 2009-2012 Free Software Foundation, Inc. -- 1.7.12.363.g53284de