diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2009-07-26 15:50:05 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2009-07-26 15:50:05 +0000 |
commit | 7499c0ea68ce760474e8b4e98e74f2e0f120cc77 (patch) | |
tree | 2477195b503eed4748f3644d2fea8ea5b6692170 /lib/libsndio | |
parent | 3743c9d6c5dee78156b625efa61e1c78ba3f7a3a (diff) |
more style improvemets, from Thomas Pfaff
Diffstat (limited to 'lib/libsndio')
-rw-r--r-- | lib/libsndio/sndio.c | 6 | ||||
-rw-r--r-- | lib/libsndio/sun.c | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/libsndio/sndio.c b/lib/libsndio/sndio.c index f50d871b793..9539e26db57 100644 --- a/lib/libsndio/sndio.c +++ b/lib/libsndio/sndio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sndio.c,v 1.19 2009/07/26 13:33:30 ratchov Exp $ */ +/* $OpenBSD: sndio.c,v 1.20 2009/07/26 15:50:04 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -303,11 +303,11 @@ sio_setpar(struct sio_hdl *hdl, struct sio_par *par) hdl->eof = 1; return 0; } - if (par->bufsz != (unsigned)~0) { + if (par->bufsz != ~0U) { DPRINTF("sio_setpar: setting bufsz is deprecated\n"); par->appbufsz = par->bufsz; } - if (par->rate != (unsigned)~0 && par->appbufsz == (unsigned)~0) + if (par->rate != ~0U && par->appbufsz == ~0U) par->appbufsz = par->rate * 200 / 1000; return hdl->ops->setpar(hdl, par); } diff --git a/lib/libsndio/sun.c b/lib/libsndio/sun.c index 5f267745d33..c15d1a67fc9 100644 --- a/lib/libsndio/sun.c +++ b/lib/libsndio/sun.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sun.c,v 1.20 2009/07/26 12:38:20 ratchov Exp $ */ +/* $OpenBSD: sun.c,v 1.21 2009/07/26 15:50:04 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -547,11 +547,11 @@ sun_setpar(struct sio_hdl *sh, struct sio_par *par) */ bufsz = par->appbufsz; round = par->round; - if (bufsz != (unsigned)~0) { - if (round == (unsigned)~0) + if (bufsz != ~0U) { + if (round == ~0U) round = (bufsz + 1) / 2; - } else if (round != (unsigned)~0) { - if (bufsz == (unsigned)~0) + } else if (round != ~0U) { + if (bufsz == ~0U) bufsz = round * 2; } else return 1; |