From: Denis Vlasenko Date: Thu, 6 Nov 2008 15:13:33 +0000 (-0000) Subject: basename: fix error code. again. deja vu feeling... X-Git-Tag: 1_13_0~20 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=70e8f49f71b824bbc7c5ec825eb33108134d1ee5;p=oweals%2Fbusybox.git basename: fix error code. again. deja vu feeling... --- diff --git a/coreutils/basename.c b/coreutils/basename.c index a3085ede3..8a5597e65 100644 --- a/coreutils/basename.c +++ b/coreutils/basename.c @@ -48,5 +48,6 @@ int basename_main(int argc, char **argv) /* puts(s) will do, but we can do without stdio this way: */ s[m++] = '\n'; - return full_write(STDOUT_FILENO, s, m) == (ssize_t)m; + /* NB: != is correct here: */ + return full_write(STDOUT_FILENO, s, m) != (ssize_t)m; }