From 87fdd627ce7e84667190258207404a1df24841fa Mon Sep 17 00:00:00 2001 From: krw Date: Mon, 14 Jun 2021 17:34:06 +0000 Subject: [PATCH] Only use of 'reinited' died in cmd.c r1.100. It is now set in a couple of places but never checked. Retire it. No functional change. --- sbin/fdisk/cmd.c | 5 +---- sbin/fdisk/cmd.h | 4 +--- sbin/fdisk/fdisk.c | 3 +-- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/sbin/fdisk/cmd.c b/sbin/fdisk/cmd.c index e0627d28ba9..542035dd986 100644 --- a/sbin/fdisk/cmd.c +++ b/sbin/fdisk/cmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.114 2021/06/13 15:32:36 krw Exp $ */ +/* $OpenBSD: cmd.c,v 1.115 2021/06/14 17:34:06 krw Exp $ */ /* * Copyright (c) 1997 Tobias Weingartner @@ -35,8 +35,6 @@ #include "user.h" #include "cmd.h" -int reinited; - int gedit(int); int edit(int, struct mbr *); int gsetpid(int); @@ -75,7 +73,6 @@ Xreinit(char *args, struct mbr *mbr) MBR_init(mbr); MBR_print(mbr, "s"); } - reinited = 1; printf("Use 'write' to update disk.\n"); diff --git a/sbin/fdisk/cmd.h b/sbin/fdisk/cmd.h index 498f55bb129..a1c9d1aa5bd 100644 --- a/sbin/fdisk/cmd.h +++ b/sbin/fdisk/cmd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.h,v 1.19 2015/12/01 06:25:43 krw Exp $ */ +/* $OpenBSD: cmd.h,v 1.20 2021/06/14 17:34:06 krw Exp $ */ /* * Copyright (c) 1997 Tobias Weingartner @@ -33,8 +33,6 @@ struct cmd { }; extern struct cmd cmd_table[]; -extern int reinited; - int Xreinit(char *, struct mbr *); int Xdisk(char *, struct mbr *); int Xmanual(char *, struct mbr *); diff --git a/sbin/fdisk/fdisk.c b/sbin/fdisk/fdisk.c index 9fc0abb344f..94d449ca6f8 100644 --- a/sbin/fdisk/fdisk.c +++ b/sbin/fdisk/fdisk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fdisk.c,v 1.107 2021/05/14 15:31:01 krw Exp $ */ +/* $OpenBSD: fdisk.c,v 1.108 2021/06/14 17:34:06 krw Exp $ */ /* * Copyright (c) 1997 Tobias Weingartner @@ -209,7 +209,6 @@ main(int argc, char *argv[]) query = NULL; if (i_flag) { - reinited = 1; if (g_flag) { MBR_init_GPT(&initial_mbr); GPT_init(); -- 2.20.1