mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-10 09:44:13 +00:00
Error codes should be returned as negative values
Signed-off-by: Clay Freeman <git@clayfreeman.com>
This commit is contained in:
parent
0d4de2f2ea
commit
b0b3548f1d
1 changed files with 2 additions and 2 deletions
|
@ -147,10 +147,10 @@ const int adt_getprop_copy(const void *adt, int nodeoffset, const char *name,
|
|||
const void *p = adt_getprop(adt, nodeoffset, name, &plen);
|
||||
|
||||
if (!p)
|
||||
return ADT_ERR_NOTFOUND;
|
||||
return -ADT_ERR_NOTFOUND;
|
||||
|
||||
if (plen != len)
|
||||
return ADT_ERR_BADLENGTH;
|
||||
return -ADT_ERR_BADLENGTH;
|
||||
|
||||
memcpy(out, p, len);
|
||||
return len;
|
||||
|
|
Loading…
Reference in a new issue