Date: Tue, 18 Nov 2025 00:52:10 GMT From: Christos Margiolis <christos@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: ad348a08586f - stable/15 - sound: Remove unnecessary initializations in feeder_create() Message-ID: <202511180052.5AI0qAOm046812@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=ad348a08586f9244a363a7cb9098a395c772e448 commit ad348a08586f9244a363a7cb9098a395c772e448 Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2025-11-11 12:06:32 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2025-11-18 00:51:24 +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 (cherry picked from commit 699fd108c50ccbd576476a2c95fa03e16492f2f9) --- 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) {help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202511180052.5AI0qAOm046812>
