Quantcast
Channel: Active questions tagged return-value - Stack Overflow
Viewing all articles
Browse latest Browse all 210

Why return a negative errno? (e.g. return -EIO)

$
0
0

Another simple example:

if (wpa_s->mlme.ssid_len == 0)    return -EINVAL;

Why the unary minus? Is this (usually) done for functions that return >0 on success and <(=)0 on failure, or is there some other reason?


Viewing all articles
Browse latest Browse all 210

Latest Images

Trending Articles



Latest Images