summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
74b58c5)
Just return directly when there is no cleanup to do, it is more
readable.
*ctx = malloc(sizeof(**ctx));
if (*ctx == NULL) {
fatal("cannot allocate the context (%s)\n", strerror(errno));
*ctx = malloc(sizeof(**ctx));
if (*ctx == NULL) {
fatal("cannot allocate the context (%s)\n", strerror(errno));
- ret = -ENOMEM;
- goto out;
}
memset(*ctx, 0, sizeof(**ctx));
}
memset(*ctx, 0, sizeof(**ctx));