I've just pushed these:

  * configure.ac: Remove useless 'exit's after AC_MSG_ERROR.

  * libparted/arch/linux.c (_disk_sync_part_table): Plug an obvious leak.

  adjust for const-correctness
  * libparted/arch/linux.c (_blkpg_add_partition): Make the "part"
  parameter "const".
  (_disk_sync_part_table): Make local "part" const.

>From cf4e0a93a1771c7b93d642eca2e0adfece61d2fd Mon Sep 17 00:00:00 2001
From: Jim Meyering <[EMAIL PROTECTED]>
Date: Tue, 24 Jun 2008 16:38:07 +0200
Subject: [PATCH] * configure.ac: Remove useless 'exit's after AC_MSG_ERROR.

---
 configure.ac |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7466538..996e96a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -220,7 +220,6 @@ with:
 Or install gettext.  GNU gettext is available from
        http://ftp.gnu.org/gnu/gettext
 )
-       exit
 fi

 dnl Check for libdl, if we are doing dynamic loading
@@ -233,7 +232,6 @@ if test "$enable_dynamic_loading" = yes; then
                AC_MSG_ERROR(
                        [-ldl not found!  Try using --disable-dynamic-loading]
                )
-               exit
        )
 fi
 AC_SUBST(DL_LIBS)
@@ -251,7 +249,6 @@ package as well (which may be called e2fsprogs-devel or 
something similar).
 If you compile e2fsprogs yourself then you need to do 'make install' and
 'make install-libs'.
        )
-       exit
 )
 AC_SUBST(UUID_LIBS)

@@ -306,7 +303,6 @@ Note: if you are using precompiled packages you will also 
need the development
 Note: (n)curses also seems to work as a substitute for termcap.  This was
   not found either - but you could try installing that as well.
 )
-       exit
        )
        LIBS="$OLD_LIBS"
 fi
@@ -329,7 +325,7 @@ GNU Readline could not be found which is required for the
 Note: if you are using precompiled packages you will also need the development
 package as well (which may be called readline-devel or something similar).
 )
-               exit,
+               ,
                $PARTED_LIBS
        )
        LIBS="$OLD_LIBS $PARTED_LIBS"
@@ -382,7 +378,6 @@ dnl libshouldbeinlibc
 GNU Parted requires libshouldbeinlibc when running on
 GNU/Hurd systems.  It is a standard part of a GNU/Hurd system.
                )
-               exit
        )

 dnl libstore may depend on libparted being present.
@@ -399,7 +394,7 @@ dnl libstore
 GNU Parted requires libstore when running on GNU/Hurd
 systems.  It is a standard part of a GNU/Hurd system.
                )
-               exit,
+               ,
                $OS_LIBS $UUID_LIBS $DM_LIBS $LIBS
        )
        LIBS="$OLD_LIBS"
@@ -431,7 +426,6 @@ found in a corresponding development package (usually 
called e2fsprogs-devel).
 If you can't find one try:
         http://web.mit.edu/tytso/www/linux/e2fsprogs.html
 )
-       exit
 )

 AC_CHECK_HEADERS(getopt.h)
@@ -452,7 +446,6 @@ find one try:
         ftp.gnu.org/gnu/readline
 Alternatively you can disable readline support with --without-readline
 )
-       exit
        )
 fi

@@ -467,7 +460,6 @@ version of GNU libc and its headers - which can be obtained 
from:
        ftp.gnu.org/gnu/glibc
 Or disable native language support with the --disable-nls option
 )
-       exit
        )
 fi

-- 
1.5.6.58.g8c87e


>From c2e692709ee14b56c751142f90baf88332d53ffb Mon Sep 17 00:00:00 2001
From: Jim Meyering <[EMAIL PROTECTED]>
Date: Tue, 24 Jun 2008 15:39:10 +0200
Subject: [PATCH] * libparted/arch/linux.c (_disk_sync_part_table): Plug an 
obvious leak.

---
 libparted/arch/linux.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index 4c9a2d3..29be37d 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -2240,6 +2240,7 @@ _disk_sync_part_table (PedDisk* disk)
                 }
         }

+        free (errnums);
         return ret;
 }

-- 
1.5.6.58.g8c87e


>From f34734d54bf3975225c7ca100ef354538b151333 Mon Sep 17 00:00:00 2001
From: Jim Meyering <[EMAIL PROTECTED]>
Date: Tue, 24 Jun 2008 15:46:21 +0200
Subject: [PATCH] adjust for const-correctness

* libparted/arch/linux.c (_blkpg_add_partition): Make the "part"
parameter "const".
(_disk_sync_part_table): Make local "part" const.
---
 libparted/arch/linux.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index 29be37d..3b8838a 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -2144,7 +2144,7 @@ _blkpg_part_command (PedDevice* dev, struct 
blkpg_partition* part, int op)
 }

 static int
-_blkpg_add_partition (PedDisk* disk, PedPartition* part)
+_blkpg_add_partition (PedDisk* disk, const PedPartition *part)
 {
         struct blkpg_partition  linux_part;
         const char*             vol_name;
@@ -2223,7 +2223,7 @@ _disk_sync_part_table (PedDisk* disk)
         }

         for (i = 1; i <= last; i++) {
-                PedPartition*           part;
+                const PedPartition *part;

                 part = ped_disk_get_partition (disk, i);
                 if (part) {
-- 
1.5.6.58.g8c87e


_______________________________________________
parted-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/parted-devel

Reply via email to