consistent error check

This commit is contained in:
Connor Lane Smith
2011-06-04 12:20:41 +01:00
parent de221bc6f5
commit d90ced2047
13 changed files with 22 additions and 22 deletions

2
ln.c
View File

@@ -34,7 +34,7 @@ main(int argc, char *argv[])
int
ln(const char *s1, const char *s2)
{
if(fflag && remove(s2) != 0 && errno != ENOENT)
if(fflag && remove(s2) == -1 && errno != ENOENT)
eprintf("remove %s:", s2);
return (sflag ? symlink : link)(s1, s2);
}