summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Graf <tgraf@redhat.com>2012-08-29 10:05:51 (GMT)
committerThomas Graf <tgraf@redhat.com>2012-08-29 10:05:51 (GMT)
commit376a0e29c720add10064b9caa51d8b854b936c48 (patch)
tree3d9cdfc698b87b46c814f34f3c5bdee0728af530
parent8222519f85921595b4f36e4dde927fcc677a4afb (diff)
downloadlibnl-376a0e29c720add10064b9caa51d8b854b936c48.zip
libnl-376a0e29c720add10064b9caa51d8b854b936c48.tar.gz
libnl-376a0e29c720add10064b9caa51d8b854b936c48.tar.bz2
Fix build warning after const char ** convert
Commit 25d640da4a caused the following build warning: ../include/netlink/utils.h:47:15: note: expected 'const char **' but argument is of type 'char **' route/link/inet6.c:300:11: warning: passing argument 2 of 'nl_cancel_down_bytes' from incompatible pointer type [enabled by default] Revert the const char ** change. Signed-off-by: Thomas Graf <tgraf@suug.ch>
-rw-r--r--include/netlink/utils.h4
-rw-r--r--lib/utils.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/include/netlink/utils.h b/include/netlink/utils.h
index 397f9b5..502341a 100644
--- a/include/netlink/utils.h
+++ b/include/netlink/utils.h
@@ -44,8 +44,8 @@ enum {
};
/* unit pretty-printing */
-extern double nl_cancel_down_bytes(unsigned long long, const char **);
-extern double nl_cancel_down_bits(unsigned long long, const char **);
+extern double nl_cancel_down_bytes(unsigned long long, char **);
+extern double nl_cancel_down_bits(unsigned long long, char **);
extern int nl_rate2str(unsigned long long, int, char *, size_t);
extern double nl_cancel_down_us(uint32_t, char **);
diff --git a/lib/utils.c b/lib/utils.c
index 0f6ff14..74f5639 100644
--- a/lib/utils.c
+++ b/lib/utils.c
@@ -125,7 +125,7 @@ int __nl_read_num_str_file(const char *path, int (*cb)(long, const char *))
*
* @return The cancelled down byte counter in the new unit.
*/
-double nl_cancel_down_bytes(unsigned long long l, const char **unit)
+double nl_cancel_down_bytes(unsigned long long l, char **unit)
{
if (l >= 1099511627776LL) {
*unit = "TiB";
@@ -156,7 +156,7 @@ double nl_cancel_down_bytes(unsigned long long l, const char **unit)
*
* @return The cancelled down bit counter in the new unit.
*/
-double nl_cancel_down_bits(unsigned long long l, const char **unit)
+double nl_cancel_down_bits(unsigned long long l, char **unit)
{
if (l >= 1000000000000ULL) {
*unit = "Tbit";