summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
2b23328)
Just test if hashmap_get returns null. hashmap_contains does exactly
same thing internally so this is slightly more efficient for the true
case.
Silences a coverity warning too. CID#
1237648
- if (hashmap_contains(all_services, name))
- service = hashmap_get(all_services, name);
- else {
+ service = hashmap_get(all_services, name);
+ if (!service){
log_warning("Could not find init script for %s", name);
continue;
}
log_warning("Could not find init script for %s", name);
continue;
}