mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 14:41:25 +00:00
stat-file: Exit earlier to reduce indentation
Just style change. Invert the if to exit earlier. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe de Dinechin <dinechin@redhat.com>
This commit is contained in:
parent
d701fac78f
commit
486aea984b
@ -154,12 +154,11 @@ stat_file_add_node(RedStatFile *stat_file, StatNodeRef parent, const char *name,
|
||||
stat_file->stat->nodes[parent].first_child_index);
|
||||
while (ref != INVALID_STAT_REF) {
|
||||
node = &stat_file->stat->nodes[ref];
|
||||
if (strcmp(name, node->name)) {
|
||||
ref = node->next_sibling_index;
|
||||
} else {
|
||||
if (strcmp(name, node->name) == 0) {
|
||||
pthread_mutex_unlock(&stat_file->lock);
|
||||
return ref;
|
||||
}
|
||||
ref = node->next_sibling_index;
|
||||
}
|
||||
for (ref = 0; ref < stat_file->max_nodes; ref++) {
|
||||
node = &stat_file->stat->nodes[ref];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user