diff options
Diffstat (limited to 'libbb/update_passwd.c')
-rw-r--r-- | libbb/update_passwd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/update_passwd.c b/libbb/update_passwd.c index e050dfc0e..a2be0f155 100644 --- a/libbb/update_passwd.c +++ b/libbb/update_passwd.c @@ -133,7 +133,7 @@ int FAST_FUNC update_passwd(const char *filename, goto close_old_fp; created: - if (!fstat(old_fd, &sb)) { + if (fstat(old_fd, &sb) == 0) { fchmod(new_fd, sb.st_mode & 0777); /* ignore errors */ fchown(new_fd, sb.st_uid, sb.st_gid); } |