summaryrefslogtreecommitdiffstats
path: root/libdm/libdm-common.c
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2011-03-30 12:14:36 +0000
committerZdenek Kabelac <zkabelac@redhat.com>2011-03-30 12:14:36 +0000
commitb8bdd780d85aa3444e25906c05c8f9a60f44c5f2 (patch)
tree723d2587e6ecac31ffb47748dec65b183b0654de /libdm/libdm-common.c
parent1bedd3a97b80aba449ee1c0a2692885b051fd34f (diff)
downloadlvm2-b8bdd780d85aa3444e25906c05c8f9a60f44c5f2.tar.gz
lvm2-b8bdd780d85aa3444e25906c05c8f9a60f44c5f2.tar.xz
lvm2-b8bdd780d85aa3444e25906c05c8f9a60f44c5f2.zip
Fix 2 signess warnings reported by gcc
Replace int with unsigned counter. Replace snprintf with dm_snprintf.
Diffstat (limited to 'libdm/libdm-common.c')
-rw-r--r--libdm/libdm-common.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libdm/libdm-common.c b/libdm/libdm-common.c
index 7cce3a7a..1ae1027c 100644
--- a/libdm/libdm-common.c
+++ b/libdm/libdm-common.c
@@ -794,7 +794,7 @@ static void _del_node_op(struct node_op_parms *nop)
/* Check if there is other the type of node operation stacked */
static int _other_node_ops(node_op_t type)
{
- int i;
+ unsigned i;
for (i = 0; i < NUM_NODES; i++)
if (type != i && _count_node_ops[i])
@@ -958,8 +958,7 @@ int dm_set_dev_dir(const char *dev_dir)
len = strlen(dev_dir);
slash = dev_dir[len-1] == '/' ? "" : "/";
- if (snprintf(_dm_dir, sizeof _dm_dir, "%s%s%s", dev_dir, slash, DM_DIR)
- >= sizeof _dm_dir) {
+ if (dm_snprintf(_dm_dir, sizeof _dm_dir, "%s%s%s", dev_dir, slash, DM_DIR) < 0) {
log_debug("Invalid dev_dir value, %s: name too long.", dev_dir);
return 0;
}