((char*) buf)[st.st_size - 4] = 0;
((char*) buf)[st.st_size - 4 + 1] = 0;
- *value = buf;
- buf = NULL;
+ *value = TAKE_PTR(buf);
*size = (size_t) st.st_size - 4;
if (attribute)
}
}
- if (title) {
- *title = s;
- s = NULL;
- }
+ if (title)
+ *title = TAKE_PTR(s);
if (part_uuid)
*part_uuid = p_uuid;
- if (path) {
- *path = p;
- p = NULL;
- }
+ if (path)
+ *path = TAKE_PTR(p);
if (active)
*active = !!(header->attr & LOAD_OPTION_ACTIVE);
l / sizeof(uint16_t) > INT_MAX)
return -EINVAL;
- *order = buf;
- buf = NULL;
+ *order = TAKE_PTR(buf);
return (int) (l / sizeof(uint16_t));
}
qsort_safe(list, count, sizeof(uint16_t), cmp_uint16);
- *options = list;
- list = NULL;
+ *options = TAKE_PTR(list);
+
return count;
}