summaryrefslogtreecommitdiff
path: root/sbin/disklabel/editor.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2000-08-13 22:07:15 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2000-08-13 22:07:15 +0000
commit260fdf95fe2f3d2e9b9ea59feb06b994fe21e45e (patch)
treefaf8da4ea67e93f39ba0cf2a1c35c6daf843db87 /sbin/disklabel/editor.c
parent0300a1edcf40d953dcac9e6b04c568ce227f46d6 (diff)
Get rid of fflush(stdout); rewind(stdin); pairs since we should not
have to worry about stdout == stdin (and since this is done inconsistently it is useless anyway). Pointed out by map@infinitum.ch.
Diffstat (limited to 'sbin/disklabel/editor.c')
-rw-r--r--sbin/disklabel/editor.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c
index 7e1a15e4bb4..3ede3b2a66b 100644
--- a/sbin/disklabel/editor.c
+++ b/sbin/disklabel/editor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: editor.c,v 1.72 2000/06/04 18:34:41 millert Exp $ */
+/* $OpenBSD: editor.c,v 1.73 2000/08/13 22:07:14 millert Exp $ */
/*
* Copyright (c) 1997-2000 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -28,7 +28,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: editor.c,v 1.72 2000/06/04 18:34:41 millert Exp $";
+static char rcsid[] = "$OpenBSD: editor.c,v 1.73 2000/08/13 22:07:14 millert Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -204,8 +204,6 @@ editor(lp, f, dev, fstabfile)
lastlabel = label;
for (;;) {
fputs("> ", stdout);
- fflush(stdout);
- rewind(stdin);
if (fgets(buf, sizeof(buf), stdin) == NULL) {
putchar('\n');
buf[0] = 'q';
@@ -1044,8 +1042,6 @@ getstring(prompt, helpstring, oval)
buf[0] = '\0';
do {
printf("%s: [%s] ", prompt, oval ? oval : "");
- fflush(stdout);
- rewind(stdin);
if (fgets(buf, sizeof(buf), stdin) == NULL) {
buf[0] = '\0';
if (feof(stdin)) {
@@ -1094,8 +1090,6 @@ getuint(lp, partno, prompt, helpstring, oval, maxval, offset, flags)
buf[0] = '\0';
do {
printf("%s: [%u] ", prompt, oval);
- fflush(stdout);
- rewind(stdin);
if (fgets(buf, sizeof(buf), stdin) == NULL) {
buf[0] = '\0';
if (feof(stdin)) {