From b90e880f118b478a45a5e04104df4a337d1a1131 Mon Sep 17 00:00:00 2001 From: jsg Date: Tue, 5 May 2015 13:36:22 +0000 Subject: [PATCH] add missing braces in _aucat_wmsg() As ratchov@ notes: "all _aucat_wmsg() callers set hdl->wtodo, so your diff can't break things that used to work by accident." ok ratchov@ --- lib/libsndio/aucat.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/libsndio/aucat.c b/lib/libsndio/aucat.c index 4a10b773586..a1e3f8d5b0e 100644 --- a/lib/libsndio/aucat.c +++ b/lib/libsndio/aucat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aucat.c,v 1.62 2014/09/07 10:12:17 guenther Exp $ */ +/* $OpenBSD: aucat.c,v 1.63 2015/05/05 13:36:22 jsg Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov * @@ -88,9 +88,10 @@ _aucat_wmsg(struct aucat *hdl, int *eof) ssize_t n; unsigned char *data; - if (hdl->wstate == WSTATE_IDLE) + if (hdl->wstate == WSTATE_IDLE) { hdl->wstate = WSTATE_MSG; hdl->wtodo = sizeof(struct amsg); + } if (hdl->wstate != WSTATE_MSG) { DPRINTF("_aucat_wmsg: bad state\n"); abort(); -- 2.20.1