Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160138924
D45776.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
887 B
Referenced Files
None
Subscribers
None
D45776.diff
View Options
diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c
--- a/sys/dev/sound/pcm/dsp.c
+++ b/sys/dev/sound/pcm/dsp.c
@@ -287,15 +287,6 @@
priv = NULL;
}
-#define DSP_FIXUP_ERROR() do { \
- if (!DSP_F_VALID(flags)) \
- error = EINVAL; \
- if (!DSP_F_DUPLEX(flags) && \
- ((DSP_F_READ(flags) && d->reccount == 0) || \
- (DSP_F_WRITE(flags) && d->playcount == 0))) \
- error = ENOTSUP; \
-} while (0)
-
static int
dsp_open(struct cdev *i_dev, int flags, int mode, struct thread *td)
{
@@ -330,7 +321,12 @@
PCM_WAIT(d);
error = 0;
- DSP_FIXUP_ERROR();
+ if (!DSP_F_VALID(flags))
+ error = EINVAL;
+ else if (!DSP_F_DUPLEX(flags) &&
+ ((DSP_F_READ(flags) && d->reccount == 0) ||
+ (DSP_F_WRITE(flags) && d->playcount == 0)))
+ error = ENOTSUP;
if (pcm_getflags(d->dev) & SD_F_SIMPLEX) {
if (DSP_F_DUPLEX(flags)) {
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jun 22, 5:09 PM (20 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34200568
Default Alt Text
D45776.diff (887 B)
Attached To
Mode
D45776: sound: Make DSP_FIXUP_ERROR() regular code
Attached
Detach File
Event Timeline
Log In to Comment