summaryrefslogtreecommitdiffstats
path: root/gdbus
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2012-05-17 15:19:59 -0300
committerMarcel Holtmann <marcel@holtmann.org>2012-05-17 19:58:01 -0700
commit37805e01977d983d52802cb85701e0453583924f (patch)
tree10f3c78155c0dce09d7f2a39e00453a8d79d5389 /gdbus
parenta77fcca3c6d830044eab2b6109d08cb3369d481c (diff)
downloadofono-37805e01977d983d52802cb85701e0453583924f.tar.bz2
gdbus: do not call memset for terminating NUL
Diffstat (limited to 'gdbus')
-rw-r--r--gdbus/object.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdbus/object.c b/gdbus/object.c
index 7a941562..e378074e 100644
--- 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;