From d81d6940ca8180e23b2d02f74e1b419119f28251 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 19 May 2005 15:14:05 +0000 Subject: [PATCH] Fix bugs in perm option Fixed silly bugs in perm option. --- src/pcm/pcm_file.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pcm/pcm_file.c b/src/pcm/pcm_file.c index acd1d2ca..38c6577a 100644 --- a/src/pcm/pcm_file.c +++ b/src/pcm/pcm_file.c @@ -27,6 +27,7 @@ */ #include +#include #include "pcm_local.h" #include "pcm_plugin.h" @@ -539,18 +540,18 @@ int _snd_pcm_file_open(snd_pcm_t **pcmp, const char *name, continue; } if (strcmp(id, "perm") == 0) { - char *perm; + char *str; char *endp; - err = snd_config_get_ascii(n, &perm); + err = snd_config_get_ascii(n, &str); if (err < 0) { SNDERR("The field perm must be a valid file permission"); return err; } - if (isdigit(*perm) == 0) { + if (isdigit(*str) == 0) { SNDERR("The field perm must be a valid file permission"); return -EINVAL; } - perm = strtol(perm, &endp, 8); + perm = strtol(str, &endp, 8); continue; } SNDERR("Unknown field %s", id); -- 2.47.1