diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2012-04-11 06:05:44 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2012-04-11 06:05:44 +0000 |
commit | 61de1370078d8018aa3697f8700e90150a0e97f0 (patch) | |
tree | 37edec6d5e4b8f39c1c9b8174acebb1e2c8b54ae /usr.bin/aucat/dev.c | |
parent | cc808ad5eaeb6f21df2ea9a638191d88edf05078 (diff) |
Use "unsigned int" rather than "unsigned". No object change.
suggested by deraadt@
Diffstat (limited to 'usr.bin/aucat/dev.c')
-rw-r--r-- | usr.bin/aucat/dev.c | 55 |
1 files changed, 28 insertions, 27 deletions
diff --git a/usr.bin/aucat/dev.c b/usr.bin/aucat/dev.c index ca75241d2f5..5794ce21585 100644 --- a/usr.bin/aucat/dev.c +++ b/usr.bin/aucat/dev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dev.c,v 1.78 2012/04/04 11:16:24 ratchov Exp $ */ +/* $OpenBSD: dev.c,v 1.79 2012/04/11 06:05:43 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -89,7 +89,7 @@ void dev_onmove(void *, int); int devctl_open(struct dev *, struct devctl *); struct dev *dev_list = NULL; -unsigned dev_sndnum = 0, dev_thrnum = 0; +unsigned int dev_sndnum = 0, dev_thrnum = 0; #ifdef DEBUG void @@ -109,11 +109,11 @@ dev_dbg(struct dev *d) * Create a sndio device */ struct dev * -dev_new(char *path, unsigned mode, - unsigned bufsz, unsigned round, unsigned hold, unsigned autovol) +dev_new(char *path, unsigned int mode, unsigned int bufsz, unsigned int round, + unsigned int hold, unsigned int autovol) { struct dev *d; - unsigned *pnum, i; + unsigned int *pnum, i; pnum = (mode & MODE_THRU) ? &dev_thrnum : &dev_sndnum; if (*pnum == DEV_NMAX) { @@ -164,7 +164,7 @@ dev_new(char *path, unsigned mode, * adjust device parameters and mode */ void -dev_adjpar(struct dev *d, unsigned mode, +dev_adjpar(struct dev *d, unsigned int mode, struct aparams *ipar, struct aparams *opar) { d->reqmode |= (mode | MODE_MIDIMASK); @@ -198,7 +198,7 @@ dev_init(struct dev *d) * Add a MIDI port to the device */ int -devctl_add(struct dev *d, char *path, unsigned mode) +devctl_add(struct dev *d, char *path, unsigned int mode) { struct devctl *c; @@ -255,7 +255,7 @@ dev_open(struct dev *d) struct aparams par; struct aproc *conv; struct abuf *buf; - unsigned siomode, cmin, cmax, rate; + unsigned int siomode, cmin, cmax, rate; d->mode = d->reqmode; d->round = d->reqround; @@ -666,7 +666,7 @@ dev_close(struct dev *d) void dev_drain(struct dev *d) { - unsigned i; + unsigned int i; struct ctl_slot *s; for (i = 0, s = d->slot; i < CTL_NSLOT; i++, s++) { @@ -715,8 +715,8 @@ dev_midiattach(struct dev *d, struct abuf *ibuf, struct abuf *obuf) } } -unsigned -dev_roundof(struct dev *d, unsigned newrate) +unsigned int +dev_roundof(struct dev *d, unsigned int newrate) { return (d->round * newrate + d->rate / 2) / d->rate; } @@ -902,7 +902,7 @@ dev_wakeup(struct dev *d) */ int dev_getep(struct dev *d, - unsigned mode, struct abuf **sibuf, struct abuf **sobuf) + unsigned int mode, struct abuf **sibuf, struct abuf **sobuf) { struct abuf *ibuf, *obuf; @@ -974,7 +974,8 @@ dev_getep(struct dev *d, * them underruns/overruns). */ void -dev_sync(struct dev *d, unsigned mode, struct abuf *ibuf, struct abuf *obuf) +dev_sync(struct dev *d, unsigned int mode, + struct abuf *ibuf, struct abuf *obuf) { int delta, offs; struct abuf *mbuf = NULL; @@ -1026,7 +1027,7 @@ dev_sync(struct dev *d, unsigned mode, struct abuf *ibuf, struct abuf *obuf) * return the current latency (in frames), ie the latency that * a stream would have if dev_attach() is called on it. * - * XXX: return a "unsigned", since result is always positive, isn't it? + * XXX: return a "unsigned int", since result is always positive, isn't it? */ int dev_getpos(struct dev *d) @@ -1047,14 +1048,14 @@ dev_getpos(struct dev *d) * and rec. */ void -dev_attach(struct dev *d, char *name, unsigned mode, - struct abuf *ibuf, struct aparams *sipar, unsigned inch, - struct abuf *obuf, struct aparams *sopar, unsigned onch, - unsigned xrun, int vol) +dev_attach(struct dev *d, char *name, unsigned int mode, + struct abuf *ibuf, struct aparams *sipar, unsigned int inch, + struct abuf *obuf, struct aparams *sopar, unsigned int onch, + unsigned int xrun, int vol) { struct aparams ipar, opar; struct aproc *conv; - unsigned round, nblk, nch; + unsigned int round, nblk, nch; #ifdef DEBUG if ((!APROC_OK(d->mix) && (mode & MODE_PLAY)) || @@ -1324,8 +1325,8 @@ dev_mkslot(struct dev *d, char *who) char *s; struct ctl_slot *slot; char name[CTL_NAMEMAX]; - unsigned i, unit, umap = 0; - unsigned ser, bestser, bestidx; + unsigned int i, unit, umap = 0; + unsigned int ser, bestser, bestidx; /* * create a ``valid'' control name (lowcase, remove [^a-z], trucate) @@ -1483,7 +1484,7 @@ dev_slotdel(struct dev *d, int slot) * can work because all streams have a slot */ void -dev_slotvol(struct dev *d, int slot, unsigned vol) +dev_slotvol(struct dev *d, int slot, unsigned int vol) { #ifdef DEBUG if (debug_level >= 3) { @@ -1507,7 +1508,7 @@ dev_slotvol(struct dev *d, int slot, unsigned vol) int dev_try(struct dev *d, int slot) { - unsigned i; + unsigned int i; struct ctl_slot *s; if (d->tstate != CTL_START) { @@ -1624,7 +1625,7 @@ dev_mmcstart(struct dev *d) void dev_mmcstop(struct dev *d) { - unsigned i; + unsigned int i; struct ctl_slot *s; switch (d->tstate) { @@ -1662,9 +1663,9 @@ dev_mmcstop(struct dev *d) * relocate all slots simultaneously */ void -dev_loc(struct dev *d, unsigned origin) +dev_loc(struct dev *d, unsigned int origin) { - unsigned i; + unsigned int i; struct ctl_slot *s; #ifdef DEBUG @@ -1707,7 +1708,7 @@ dev_onmove(void *arg, int delta) } void -dev_master(struct dev *d, unsigned master) +dev_master(struct dev *d, unsigned int master) { #ifdef DEBUG if (debug_level >= 3) { |