projects
/
framework
/
connectivity
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
492912e
)
gdbus: do not call memset for terminating NUL
author
Lucas De Marchi
<lucas.demarchi@profusion.mobi>
Thu, 17 May 2012 18:19:59 +0000
(15:19 -0300)
committer
Marcel Holtmann
<marcel@holtmann.org>
Fri, 18 May 2012 02:57:55 +0000
(19:57 -0700)
gdbus/object.c
patch
|
blob
|
history
diff --git
a/gdbus/object.c
b/gdbus/object.c
index
7a94156
..
e378074
100644
(file)
--- a/
gdbus/object.c
+++ b/
gdbus/object.c
@@
-72,7
+72,6
@@
static void print_arguments(GString *gstr, const char *sig,
complete = FALSE;
struct_level = dict_level = 0;
- memset(type, 0, sizeof(type));
/* Gather enough data to have a single complete type */
for (len = 0; len < (sizeof(type) - 1) && sig[i]; len++, i++) {
@@
-107,6
+106,8
@@
static void print_arguments(GString *gstr, const char *sig,
break;
}
+ type[len + 1] = '\0';
+
if (!complete) {
error("Unexpected signature: %s", sig);
return;