]> sourceware.org Git - lvm2.git/commitdiff
cleanup: use matching signed number comparation
authorZdenek Kabelac <zkabelac@redhat.com>
Sun, 12 Feb 2017 17:18:54 +0000 (18:18 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Mon, 13 Feb 2017 09:06:19 +0000 (10:06 +0100)
lib/metadata/metadata.c
libdm/libdm-report.c
libdm/libdm-stats.c
tools/reporter.c
tools/toollib.c
tools/vgextend.c

index 0731108bdc3e7e0522159541ab0df6606e672474..b11d30697d7c6858947080b58be7629a09519ee0 100644 (file)
@@ -6383,7 +6383,7 @@ int vg_strip_outdated_historical_lvs(struct volume_group *vg) {
                 * Removal time in the future? Not likely,
                 * but skip this item in any case.
                */
-               if ((current_time) < glvl->glv->historical->timestamp_removed)
+               if (current_time < (time_t) glvl->glv->historical->timestamp_removed)
                        continue;
 
                if ((current_time - glvl->glv->historical->timestamp_removed) > threshold) {
index f9e261dd3784112ad9497c92ed4665184cf7db50..7caba985b94eb6bf7c4d6081baeddd9f180f8022 100644 (file)
@@ -4209,7 +4209,7 @@ static void _recalculate_fields(struct dm_report *rh)
 {
        struct row *row;
        struct dm_report_field *field;
-       size_t len;
+       int len;
 
        dm_list_iterate_items(row, &rh->rows) {
                dm_list_iterate_items(field, &row->fields) {
index b74a470990927f6c5c0990608ecf0a4257f0a66b..587c748919ad32b18b55b68038cc52257589e51b 100644 (file)
@@ -3294,7 +3294,7 @@ static void _sum_histogram_bins(const struct dm_stats *dms,
        struct dm_stats_region *region;
        struct dm_histogram_bin *bins;
        struct dm_histogram *dmh_cur;
-       uint64_t bin;
+       int bin;
 
        region = &dms->regions[region_id];
        dmh_cur = region->counters[area_id].histogram;
@@ -4003,7 +4003,7 @@ merge:
 static void _stats_copy_histogram_bounds(struct dm_histogram *to,
                                         struct dm_histogram *from)
 {
-       uint64_t i;
+       int i;
 
        to->nr_bins = from->nr_bins;
 
@@ -4019,7 +4019,7 @@ static void _stats_copy_histogram_bounds(struct dm_histogram *to,
 static int _stats_check_histogram_bounds(struct dm_histogram *h1,
                                         struct dm_histogram *h2)
 {
-       uint64_t i;
+       int i;
 
        if (!h1 || !h2)
                return 0;
index e70fa29606c13e1477840a7b59f1c183c607f287..00606edc43408f7f9708d5ea0119bd24f938f3b0 100644 (file)
@@ -707,7 +707,7 @@ int report_for_selection(struct cmd_context *cmd,
 
 static void _check_pv_list(struct cmd_context *cmd, struct report_args *args, struct single_report_args *single_args)
 {
-       unsigned i;
+       int i;
        int rescan_done = 0;
 
        if (!args->argv)
index 235e535edb2fd1291eabe28f6631d6152d16d13a..5f3deb7ed2fc57fea6cc32eb537a80463a296d35 100644 (file)
@@ -4499,7 +4499,7 @@ int pvcreate_each_device(struct cmd_context *cmd,
        int consistent = 0;
        int must_use_all = (cmd->command->flags & MUST_USE_ALL_ARGS);
        int found;
-       int i;
+       unsigned i;
 
        set_pv_notify(cmd);
 
index 344dff01d59f9f5ad94c1990ca3d4fadbaad7d2d..e16316fd9ad654e7077709747476b8a56e50b208 100644 (file)
@@ -49,7 +49,7 @@ static int _vgextend_restoremissing(struct cmd_context *cmd __attribute__((unuse
        struct vgextend_params *vp = (struct vgextend_params *) handle->custom_handle;
        struct pvcreate_params *pp = &vp->pp;
        int fixed = 0;
-       int i;
+       unsigned i;
 
        if (!archive(vg))
                return_0;
This page took 0.05321 seconds and 5 git commands to generate.