From: jsg Date: Tue, 5 May 2015 13:36:22 +0000 (+0000) Subject: add missing braces in _aucat_wmsg() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b90e880f118b478a45a5e04104df4a337d1a1131;p=openbsd 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@ --- 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();