public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfsprogs: do not redeclare globals provided by libraries
@ 2020-01-27 22:56 Eric Sandeen
  2020-01-28  3:29 ` Darrick J. Wong
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Eric Sandeen @ 2020-01-27 22:56 UTC (permalink / raw)
  To: linux-xfs

From: Eric Sandeen <sandeen@redhat.com>

In each of these cases, db, logprint, and mdrestore are redeclaring
as a global variable something which was already provided by a
library they link with.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

diff --git a/db/init.c b/db/init.c
index 455220a..0ac3736 100644
--- a/db/init.c
+++ b/db/init.c
@@ -27,7 +27,6 @@ static int		force;
  static struct xfs_mount	xmount;
  struct xfs_mount	*mp;
  static struct xlog	xlog;
-libxfs_init_t		x;
  xfs_agnumber_t		cur_agno = NULLAGNUMBER;

  static void
diff --git a/logprint/logprint.c b/logprint/logprint.c
index 7754a2a..511a32a 100644
--- a/logprint/logprint.c
+++ b/logprint/logprint.c
@@ -24,7 +24,6 @@ int	print_buffer;
  int	print_overwrite;
  int     print_no_data;
  int     print_no_print;
-int     print_exit = 1; /* -e is now default. specify -c to override */
  static int	print_operation = OP_PRINT;

  static void
@@ -132,6 +131,7 @@ main(int argc, char **argv)
  	bindtextdomain(PACKAGE, LOCALEDIR);
  	textdomain(PACKAGE);
  	memset(&mount, 0, sizeof(mount));
+	print_exit = 1; /* -e is now default. specify -c to override */

  	progname = basename(argv[0]);
  	while ((c = getopt(argc, argv, "bC:cdefl:iqnors:tDVv")) != EOF) {
@@ -152,7 +152,7 @@ main(int argc, char **argv)
  			case 'e':
  			    /* -e is now default
  			     */
-				print_exit++;
+				print_exit = 1;
  				break;
  			case 'C':
  				print_operation = OP_COPY;
diff --git a/mdrestore/xfs_mdrestore.c b/mdrestore/xfs_mdrestore.c
index 3375e08..1cd399d 100644
--- a/mdrestore/xfs_mdrestore.c
+++ b/mdrestore/xfs_mdrestore.c
@@ -7,7 +7,6 @@
  #include "libxfs.h"
  #include "xfs_metadump.h"

-char 		*progname;
  static int	show_progress = 0;
  static int	show_info = 0;
  static int	progress_since_warning = 0;


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-01-29 22:20 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-27 22:56 [PATCH] xfsprogs: do not redeclare globals provided by libraries Eric Sandeen
2020-01-28  3:29 ` Darrick J. Wong
2020-01-28 14:48   ` Eric Sandeen
2020-01-28 22:26     ` Dave Chinner
2020-01-28 22:28       ` Eric Sandeen
2020-01-28 19:42 ` Eric Sandeen
2020-01-29 15:16 ` [PATCH V2] " Eric Sandeen
2020-01-29 16:01   ` Darrick J. Wong
2020-01-29 16:57     ` Eric Sandeen
2020-01-29 19:29       ` Darrick J. Wong
2020-01-29 18:06   ` Christoph Hellwig
2020-01-29 19:47   ` [PATCH V3] " Eric Sandeen
2020-01-29 21:32     ` Christoph Hellwig
2020-01-29 22:20       ` Eric Sandeen
2020-01-29 18:05 ` [PATCH] " Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox