From b356b55ad8014ed97bcedebd48e9f2df6d279b51 Mon Sep 17 00:00:00 2001 From: espie Date: Wed, 6 Dec 2017 17:15:43 +0000 Subject: [PATCH] be consistent in where we call fflush okay millert@ --- usr.bin/cdio/cddb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/cdio/cddb.c b/usr.bin/cdio/cddb.c index c5ae468db5a..ffde75b70da 100644 --- a/usr.bin/cdio/cddb.c +++ b/usr.bin/cdio/cddb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cddb.c,v 1.20 2015/01/16 06:40:06 deraadt Exp $ */ +/* $OpenBSD: cddb.c,v 1.21 2017/12/06 17:15:43 espie Exp $ */ /* * Copyright (c) 2002 Marc Espie. * @@ -94,6 +94,7 @@ send_query(FILE *f, int n, struct cd_toc_entry *e) for (i = 0; i < n; i++) fprintf(f, " %lu", entry2frames(e+i)); fprintf(f, " %lu\r\n", (entry2frames(e+n)-entry2frames(e)) /75); + fflush(cout); } #define MAXSIZE 256 @@ -285,7 +286,6 @@ cddb(const char *host_port, int n, struct cd_toc_entry *e, char *arg) } send_query(cout, n, e); - fflush(cout); line = get_answer(cin); if (!line) { warnx("cddb: problem in query"); -- 2.20.1