git: e3b94b375e1d - main - mixer(8): Use mixer_get_path()

From: Christos Margiolis <christos_at_FreeBSD.org>
Date: Thu, 23 May 2024 00:58:10 UTC
The branch main has been updated by christos:

URL: https://cgit.FreeBSD.org/src/commit/?id=e3b94b375e1d2098e9e2c07bd0079e92f6a6fe4f

commit e3b94b375e1d2098e9e2c07bd0079e92f6a6fe4f
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2024-05-23 00:57:43 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2024-05-23 00:57:43 +0000

    mixer(8): Use mixer_get_path()
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 day
    Reviewed by:    dev_submerge.ch
    Differential Revision:  https://reviews.freebsd.org/D45276
---
 usr.sbin/mixer/mixer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr.sbin/mixer/mixer.c b/usr.sbin/mixer/mixer.c
index 284ea955b7b4..07dd16536495 100644
--- a/usr.sbin/mixer/mixer.c
+++ b/usr.sbin/mixer/mixer.c
@@ -97,7 +97,7 @@ main(int argc, char *argv[])
 		if ((n = mixer_get_nmixers()) < 0)
 			errx(1, "no mixers present in the system");
 		for (i = 0; i < n; i++) {
-			(void)snprintf(buf, sizeof(buf), "/dev/mixer%d", i);
+			(void)mixer_get_path(buf, sizeof(buf), i);
 			if ((m = mixer_open(buf)) == NULL)
 				continue;
 			initctls(m);