diff mbox

[4/4] xfstests: remove manual declaration of errno

Message ID 1438006967-18815-5-git-send-email-tytso@mit.edu (mailing list archive)
State New, archived
Headers show

Commit Message

Theodore Ts'o July 27, 2015, 2:22 p.m. UTC
locktest.c has already #included <errno.h>, so remove the unneeded
(and in some cases, incorrect) manual declaration of errno as an
integer.  Some C libraries use a macro to provide thread-safety for
errno, so it's incorrect to try to provide a manual declaration.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 src/locktest.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Christoph Hellwig July 30, 2015, 5:15 p.m. UTC | #1
On Mon, Jul 27, 2015 at 10:22:47AM -0400, Theodore Ts'o wrote:
> locktest.c has already #included <errno.h>, so remove the unneeded
> (and in some cases, incorrect) manual declaration of errno as an
> integer.  Some C libraries use a macro to provide thread-safety for
> errno, so it's incorrect to try to provide a manual declaration.
> 
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/src/locktest.c b/src/locktest.c
index 23bb240..adf8ce0 100644
--- a/src/locktest.c
+++ b/src/locktest.c
@@ -779,7 +779,6 @@  main(int argc, char *argv[])
     char	*p;
     extern char	*optarg;
     extern int	optind;
-    extern int	errno;
     int fail_count = 0;; 
     
     atexit(cleanup);