Skip to content
Snippets Groups Projects
Commit 1841f011 authored by Zhang Han's avatar Zhang Han Committed by Markus Armbruster
Browse files

qobject: braces {} are necessary for all arms of this statement


Add braces {} for arms of if/for statement

Signed-off-by: default avatarZhang Han <zhanghan64@huawei.com>
Message-Id: <20201228071129.24563-5-zhanghan64@huawei.com>
Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
parent f3d71c6e
No related branches found
No related tags found
No related merge requests found
......@@ -43,8 +43,9 @@ static unsigned int tdb_hash(const char *name)
unsigned i; /* Used to cycle through random values. */
/* Set the initial value from the key size. */
for (value = 0x238F13AF * strlen(name), i = 0; name[i]; i++)
for (value = 0x238F13AF * strlen(name), i = 0; name[i]; i++) {
value = (value + (((const unsigned char *)name)[i] << (i * 5 % 24)));
}
return (1103515243 * value + 12345);
}
......@@ -93,8 +94,9 @@ static QDictEntry *qdict_find(const QDict *qdict,
QDictEntry *entry;
QLIST_FOREACH(entry, &qdict->table[bucket], next)
if (!strcmp(entry->key, key))
if (!strcmp(entry->key, key)) {
return entry;
}
return NULL;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment