Skip to content

Correctly propagate error codes #32

@apsun

Description

@apsun

A lot of code in the kernel uses the following pattern:

if (fn() < 0) {
    return -1;
}

This discards the error code and replaces it with a generic -1. If we ever want to start returning proper error codes like EINVAL, ENOMEM, etc, we need to replace this with:

if ((ret = fn()) < 0) {
    return ret;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions