diff options
author | Igor Gnatenko | 2016-09-21 08:22:35 +0200 |
---|---|---|
committer | Igor Gnatenko | 2016-09-21 08:22:35 +0200 |
commit | 0e0943c15b173015c3ff9475085bd064204f9c74 (patch) | |
tree | 8ac5531bc2d5229d31184551a66655f36b8e2fae /libfdisk | |
parent | libsmartcols: make get_line/column_separator() return const (diff) | |
download | kernel-qcow2-util-linux-0e0943c15b173015c3ff9475085bd064204f9c74.tar.gz kernel-qcow2-util-linux-0e0943c15b173015c3ff9475085bd064204f9c74.tar.xz kernel-qcow2-util-linux-0e0943c15b173015c3ff9475085bd064204f9c74.zip |
debug: use const void * for ul_debugobj()
We don't modify data it's pointing out and we should not modify it.
Also remove casting to void * as gcc will do it automatically (before
we had to cast it explicitly to avoid warning on discarding 'const'
qualifier).
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Diffstat (limited to 'libfdisk')
-rw-r--r-- | libfdisk/src/parttype.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libfdisk/src/parttype.c b/libfdisk/src/parttype.c index 8c36fdf3b..d894cf90d 100644 --- a/libfdisk/src/parttype.c +++ b/libfdisk/src/parttype.c @@ -310,7 +310,7 @@ struct fdisk_parttype *fdisk_label_parse_parttype( if (!lb->nparttypes) return NULL; - DBG(LABEL, ul_debugobj((void *) lb, "parsing '%s' (%s) partition type", + DBG(LABEL, ul_debugobj(lb, "parsing '%s' (%s) partition type", str, lb->name)); types = lb->parttypes; @@ -321,7 +321,7 @@ struct fdisk_parttype *fdisk_label_parse_parttype( code = strtol(str, &end, 16); if (errno || *end != '\0') { - DBG(LABEL, ul_debugobj((void *) lb, "parsing failed: %m")); + DBG(LABEL, ul_debugobj(lb, "parsing failed: %m")); return NULL; } ret = fdisk_label_get_parttype_from_code(lb, code); |