[Parted-commits] GNU Parted Official Repository: Changes to 'master'

Otavio Salvador otavio at alioth.debian.org
Mon May 14 16:22:01 UTC 2007


 parted/table.c           |    7 +++----
 scripts/release/clean.sh |   22 ----------------------
 2 files changed, 3 insertions(+), 26 deletions(-)

New commits:
commit f871e71df727373013d3cf04bf198a49f09b50e4
Author: David Cantrell <dcantrel at mortise.boston.redhat.com>
Date:   Wed May 9 16:45:38 2007 -0400

    Removed clean.sh script. Using git now, we don't need it anymore (git clean -d -x).

diff --git a/scripts/release/clean.sh b/scripts/release/clean.sh
deleted file mode 100755
index 6bb52fc..0000000
--- a/scripts/release/clean.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash
-# Clean tree of unmanaged files after a 'make distclean'
-
-if [ ! -d parted ] && [ ! -d libparted ]; then
-	echo "Run this from the toplevel parted directory."
-	exit 1
-fi
-
-rm -rf ChangeLog doc/mdate-sh doc/texinfo.tex
-rm -rf m4 configure config.rpath depcomp
-rm -rf parted-*.*.*
-rm -rf compile config.guess config.sub ltmain.sh mkinstalldirs
-rm -rf config.h.in autom4te.cache missing aclocal.m4 install-sh
-rm -rf doc/stamp-vti doc/version.texi doc/parted.info
-rm -rf ABOUT-NLS INSTALL
-
-rm -rf po/*.gmo po/stamp-po po/Makevars.template po/Rules-quot
-rm -rf po/Makefile.in.in
-
-find . -type f -name Makefile.in | xargs rm -f
-
-exit 0

commit e6bdd6a9aac212be9779161dbddab8a410347426
Author: David Cantrell <dcantrel at mortise.boston.redhat.com>
Date:   Wed May 9 15:15:47 2007 -0400

    Use gnulib xmalloc() and xrealloc().

diff --git a/parted/table.c b/parted/table.c
index c44db10..8768a92 100644
--- a/parted/table.c
+++ b/parted/table.c
@@ -47,6 +47,7 @@
         size_t strnlen (const char *, size_t);
 #endif
 
+#include "xalloc.h"
 #include "strlist.h"
 
 
@@ -191,16 +192,14 @@ static void table_render_row (Table* t, int rownum, int ncols, wchar_t** s)
         len += wcslen(COLSUFFIX);
 
         newsize = (wcslen(*s) + len + 1) * sizeof(wchar_t);
-        *s = (wchar_t *) realloc (*s, newsize);
-        assert(*s != NULL);
+        *s = xrealloc (*s, newsize);
 
         for (i = 0; i < ncols; ++i)
         {
                 int j;
                 int nspaces = max(t->widths[i] - wcswidth(row[i], MAX_WIDTH),
                                   0);
-                wchar_t* pad = malloc ( (nspaces + 1) * sizeof(wchar_t) );
-                assert(pad != NULL);
+                wchar_t* pad = xmalloc ((nspaces + 1) * sizeof(wchar_t));
 
                 for (j = 0; j < nspaces; ++j)
                        pad[j] = L' '; 



More information about the Parted-commits mailing list