OSDN Git Service

maint: update all copyright year number ranges
[android-x86/external-parted.git] / libparted / labels / pt-tools.c
index 9992529..a8ac4e4 100644 (file)
@@ -1,5 +1,5 @@
 /* partition table tools
-   Copyright (C) 2008-2010 Free Software Foundation, Inc.
+   Copyright (C) 2008-2012 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -40,7 +40,7 @@ static char zero[16 * 1024];
 int
 ptt_write_sector (PedDisk const *disk, void const *buf, size_t buflen)
 {
-  PED_ASSERT (buflen <= disk->dev->sector_size, return 0);
+  PED_ASSERT (buflen <= disk->dev->sector_size);
   /* Allocate a big enough buffer for ped_device_write.  */
   char *s0 = ped_malloc (disk->dev->sector_size);
   if (s0 == NULL)
@@ -65,7 +65,7 @@ ptt_read_sectors (PedDevice const *dev, PedSector start_sector,
                  PedSector n_sectors, void **buf)
 {
   char *b = ped_malloc (n_sectors * dev->sector_size);
-  PED_ASSERT (b != NULL, return 0);
+  PED_ASSERT (b != NULL);
   if (!ped_device_read (dev, b, start_sector, n_sectors)) {
     free (b);
     return 0;
@@ -88,7 +88,7 @@ ptt_read_sector (PedDevice const *dev, PedSector sector_num, void **buf)
 int
 ptt_clear_sectors (PedDevice *dev, PedSector start, PedSector n)
 {
-  PED_ASSERT (dev->sector_size <= sizeof zero, return 0);
+  PED_ASSERT (dev->sector_size <= sizeof zero);
   PedSector n_z_sectors = sizeof zero / dev->sector_size;
   PedSector n_full = n / n_z_sectors;
   PedSector i;
@@ -127,7 +127,7 @@ ptt_partition_max_start_len (char const *pt_type, const PedPartition *part)
                             " of %jd"),
                           part->geom.length,
                           pt_type,
-                          UINT32_MAX);
+                          pt_lim->max_length);
       return 0;
     }
 
@@ -140,7 +140,7 @@ ptt_partition_max_start_len (char const *pt_type, const PedPartition *part)
                           " of %jd"),
                         part->geom.start,
                         pt_type,
-                        UINT32_MAX);
+                        pt_lim->max_start_sector);
     return 0;
   }