Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Unified Diff: dbus-dict.c

Issue 2851022: dbus-dict.c::append_config_array(): Fix up DBUS_TYPE_UINT32 handling (Closed) Base URL: ssh://git@chromiumos-git/dhcpcd.git
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dbus-dict.c
diff --git a/dbus-dict.c b/dbus-dict.c
index 67bbdc361897848fc27d1b43660bf01de2a39100..922dbb6659155bad6d83013eac8ca5482ce002fb 100644
--- a/dbus-dict.c
+++ b/dbus-dict.c
@@ -164,13 +164,14 @@ append_config_array(DBusMessageIter *entry, int type, const char *data)
DBUS_TYPE_STRING, &tok);
break;
case DBUS_TYPE_UINT32:
- if (strchr(data, '.') != NULL &&
- inet_aton(data, &in) == 1)
+ if (strchr(tok, '.') != NULL &&
+ inet_aton(tok, &in) == 1)
u32 = in.s_addr;
else
u32 = strtoul(tok, NULL, 0);
ok = dbus_message_iter_append_basic(&array,
DBUS_TYPE_UINT32, &u32);
+ break;
default:
ok = FALSE;
break;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698