Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin fsck: Stop defining the same variable concurrently in b...



details:   https://anonhg.NetBSD.org/src/rev/c64cf6b17260
branches:  trunk
changeset: 458881:c64cf6b17260
user:      kamil <kamil%NetBSD.org@localhost>
date:      Thu Aug 15 03:10:42 2019 +0000

description:
fsck: Stop defining the same variable concurrently in bss and data

returntosingle was defined in multiple places:

 - fsck_lfs/main.c
 - fsck_ffs/main.c
 - fsck_ext2fs/main.c
 - fsck/fsutil.c

Keep the fsutil.c definition as the only one.

Detected during the build of telned with Address Sanitizer (MKSANITIZER).

diffstat:

 sbin/fsck_ext2fs/main.c |  6 ++----
 sbin/fsck_ffs/main.c    |  5 ++---
 sbin/fsck_lfs/main.c    |  3 +--
 3 files changed, 5 insertions(+), 9 deletions(-)

diffs (74 lines):

diff -r 78268155aed1 -r c64cf6b17260 sbin/fsck_ext2fs/main.c
--- a/sbin/fsck_ext2fs/main.c   Thu Aug 15 01:15:21 2019 +0000
+++ b/sbin/fsck_ext2fs/main.c   Thu Aug 15 03:10:42 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.39 2019/02/03 03:19:26 mrg Exp $    */
+/*     $NetBSD: main.c,v 1.40 2019/08/15 03:10:42 kamil Exp $  */
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -63,7 +63,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c     8.2 (Berkeley) 1/23/94";
 #else
-__RCSID("$NetBSD: main.c,v 1.39 2019/02/03 03:19:26 mrg Exp $");
+__RCSID("$NetBSD: main.c,v 1.40 2019/08/15 03:10:42 kamil Exp $");
 #endif
 #endif /* not lint */
 
@@ -87,7 +87,6 @@
 #include "fsutil.h"
 #include "exitvalues.h"
 
-volatile sig_atomic_t  returntosingle = 0;
 
 
 static int     argtoi(int, const char *, const char *, int);
@@ -354,4 +353,3 @@
            getprogname());
        exit(FSCK_EXIT_USAGE);
 }
-
diff -r 78268155aed1 -r c64cf6b17260 sbin/fsck_ffs/main.c
--- a/sbin/fsck_ffs/main.c      Thu Aug 15 01:15:21 2019 +0000
+++ b/sbin/fsck_ffs/main.c      Thu Aug 15 03:10:42 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.85 2019/05/05 14:59:06 christos Exp $       */
+/*     $NetBSD: main.c,v 1.86 2019/08/15 03:10:42 kamil Exp $  */
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c     8.6 (Berkeley) 5/14/95";
 #else
-__RCSID("$NetBSD: main.c,v 1.85 2019/05/05 14:59:06 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.86 2019/08/15 03:10:42 kamil Exp $");
 #endif
 #endif /* not lint */
 
@@ -71,7 +71,6 @@
 #include "snapshot.h"
 
 int    progress = 0;
-volatile sig_atomic_t  returntosingle = 0;
 
 static int     argtoi(int, const char *, const char *, int);
 static int     checkfilesys(const char *, const char *, int);
diff -r 78268155aed1 -r c64cf6b17260 sbin/fsck_lfs/main.c
--- a/sbin/fsck_lfs/main.c      Thu Aug 15 01:15:21 2019 +0000
+++ b/sbin/fsck_lfs/main.c      Thu Aug 15 03:10:42 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.53 2019/02/03 03:19:26 mrg Exp $         */
+/* $NetBSD: main.c,v 1.54 2019/08/15 03:10:43 kamil Exp $       */
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -53,7 +53,6 @@
 #include "fsutil.h"
 #include "exitvalues.h"
 
-volatile sig_atomic_t returntosingle = 0;
 
 static int argtoi(int, const char *, const char *, int);
 static int checkfilesys(const char *, char *, long, int);



Home | Main Index | Thread Index | Old Index