/* go through the list of all values */
while (record != NULL) {
/* if the variable name is found */
- if (strcmp(record->name, name) == 0) {
+ if (strcmp(record->name, name) == 0)
return 1; /* return its value */
- }
+
record = record->next;
}
for (i = 0; tmp_controllers[i][0] != '\0'; i++) {
/*
* gcc complains about truncation when using snprintf() and
- * and coverity complains about truncation when using strncpy().
+ * coverity complains about truncation when using strncpy().
* Avoid both these warnings by directly invoking memcpy()
*/
memcpy(controllers[i], tmp_controllers[i], sizeof(controllers[i]));
/* controller is on the list */
if (show_mountpoints(name)) {
/* the controller is not mounted */
- if ((flags & FL_SILENT) == 0) {
+ if ((flags & FL_SILENT) == 0)
err("ERROR: %s hierarchy not mounted\n", name);
- }
break;
}
break;
}
if (ret != ECGEOF) {
- if ((flags & FL_SILENT) != 0) {
+ if ((flags & FL_SILENT) != 0)
err("E: in get next controller %s\n", cgroup_strerror(ret));
- }
+
final_ret = ret;
}
}
if (ret != ECGEOF) {
- if ((flags & FL_SILENT) != 0) {
+ if ((flags & FL_SILENT) != 0)
err("E: in get next controller %s\n", cgroup_strerror(ret));
- }
+
final_ret = ret;
}