diff options
author | Patrik Flykt <patrik.flykt@linux.intel.com> | 2013-06-03 13:11:38 +0300 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2013-06-07 10:08:47 +0300 |
commit | a6aa682808efc88680bb6e5e90cf61e07c15454a (patch) | |
tree | da804913b70c1857c72d8be2efbdd588e381fdb1 /client | |
parent | 9a048c1e0c1dda4497a0f767f7bf56622012d6d1 (diff) | |
download | connman-a6aa682808efc88680bb6e5e90cf61e07c15454a.tar.gz connman-a6aa682808efc88680bb6e5e90cf61e07c15454a.tar.bz2 connman-a6aa682808efc88680bb6e5e90cf61e07c15454a.zip |
client: Pretty-print D-Bus signed integers
To keep it more logical, rename the unsigned variable in the code.
Diffstat (limited to 'client')
-rw-r--r-- | client/dbus_helpers.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/client/dbus_helpers.c b/client/dbus_helpers.c index 4913b688..5345d05a 100644 --- a/client/dbus_helpers.c +++ b/client/dbus_helpers.c @@ -35,7 +35,8 @@ void __connmanctl_dbus_print(DBusMessageIter *iter, const char *pre, int arg_type; dbus_bool_t b; unsigned char c; - unsigned int i; + dbus_uint32_t u; + dbus_int32_t i; double d; char *str; @@ -98,6 +99,11 @@ void __connmanctl_dbus_print(DBusMessageIter *iter, const char *pre, case DBUS_TYPE_UINT16: case DBUS_TYPE_UINT32: + dbus_message_iter_get_basic(iter, &u); + fprintf(stdout, "%d", u); + break; + + case DBUS_TYPE_INT32: dbus_message_iter_get_basic(iter, &i); fprintf(stdout, "%d", i); break; |