sbase

suckless unix tools
git clone git://git.2f30.org/sbase.git
Log | Files | Refs | README | LICENSE

commit ea7563dc0bafcb4098768380f65f680a1705517d
parent d90ced20471237c69970249b9a40a2fa4d0d1d4b
Author: Connor Lane Smith <cls@lubutu.com>
Date:   Sat Jun  4 12:22:07 +0100

fix errno
Diffstat:
chown.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/chown.c b/chown.c @@ -37,7 +37,7 @@ main(int argc, char *argv[]) if(owner && *owner) { errno = 0; pw = getpwnam(owner); - if(errno == -1) + if(errno != 0) eprintf("getpwnam %s:", owner); else if(!pw) eprintf("getpwnam %s: no such user\n", owner); @@ -45,7 +45,7 @@ main(int argc, char *argv[]) if(group && *group) { errno = 0; gr = getgrnam(group); - if(errno == -1) + if(errno != 0) eprintf("getgrnam %s:", group); else if(!gr) eprintf("getgrnam %s: no such group\n", group);