gdbus: do not call memset for terminating NUL

This commit is contained in:
Lucas De Marchi 2012-05-17 15:19:59 -03:00 committed by Marcel Holtmann
parent a77fcca3c6
commit 37805e0197
1 changed files with 2 additions and 1 deletions

View File

@ -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;