X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Funistd%2Fsetxid.c;h=0239f8afa95019ae9aa6dad5d79fcaf4eade139b;hb=e95538fa07d2b460b25ee6c2fef05f820888776d;hp=9e37ddc43372b2da62b3c6da904a1758b948a285;hpb=84b5c5479e8eae48c81295b55f4fa8dd342c97a9;p=musl diff --git a/src/unistd/setxid.c b/src/unistd/setxid.c index 9e37ddc4..0239f8af 100644 --- a/src/unistd/setxid.c +++ b/src/unistd/setxid.c @@ -32,7 +32,7 @@ int __setxid(int nr, int id, int eid, int sid) struct ctx c = { .nr = nr, .id = id, .eid = eid, .sid = sid, .err = -1 }; __synccall(do_setxid, &c); if (c.err) { - errno = c.err; + if (c.err>0) errno = c.err; return -1; } return 0;