git: 699fd108c50c - main - sound: Remove unnecessary initializations in feeder_create()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 11 Nov 2025 12:08:21 UTC
The branch main has been updated by christos:
URL: https://cgit.FreeBSD.org/src/commit/?id=699fd108c50ccbd576476a2c95fa03e16492f2f9
commit 699fd108c50ccbd576476a2c95fa03e16492f2f9
Author: Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2025-11-11 12:06:32 +0000
Commit: Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2025-11-11 12:06:32 +0000
sound: Remove unnecessary initializations in feeder_create()
We do not need to zero out fields since the struct is allocated with
M_ZERO. Also we no longer need to have a special case for the root
feeder.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D53558
---
sys/dev/sound/pcm/feeder.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c
index 874148cd9ab0..75c0f0405040 100644
--- a/sys/dev/sound/pcm/feeder.c
+++ b/sys/dev/sound/pcm/feeder.c
@@ -88,19 +88,10 @@ feeder_create(struct feeder_class *fc, struct pcm_feederdesc *desc)
if (f == NULL)
return NULL;
- f->data = NULL;
- f->source = NULL;
- f->parent = NULL;
f->class = fc;
f->desc = &(f->desc_static);
-
- if (desc) {
+ if (desc != NULL)
*(f->desc) = *desc;
- } else {
- f->class->type = FEEDER_ROOT;
- f->desc->in = 0;
- f->desc->out = 0;
- }
err = FEEDER_INIT(f);
if (err) {