summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
fc26cf1)
This makes the code a little more readable.
- devices_list = &(ctx->devices_list);
-
new_device = malloc(sizeof(*new_device));
if (new_device == NULL) {
fatal("cannot allocate a new device (%s)\n", strerror(errno));
new_device = malloc(sizeof(*new_device));
if (new_device == NULL) {
fatal("cannot allocate a new device (%s)\n", strerror(errno));
+ devices_list = &(ctx->devices_list);
+
if (*devices_list == NULL) {
*devices_list = new_device;
} else {
if (*devices_list == NULL) {
*devices_list = new_device;
} else {