]> git.alsa-project.org Git - alsa-lib.git/commitdiff
conf: use bool type for the join member in the config structure
authorJaroslav Kysela <perex@perex.cz>
Fri, 8 May 2020 09:23:34 +0000 (11:23 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 8 May 2020 09:23:38 +0000 (11:23 +0200)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/conf.c

index 50d0403452a0ad9c33fc3197f8a442d7680d6430..46bc1fb85a32a83ed79e1c4f9f9ab938b759ef6c 100644 (file)
@@ -416,6 +416,7 @@ beginning:</P>
 
 #include "local.h"
 #include <stdarg.h>
+#include <stdbool.h>
 #include <limits.h>
 #include <sys/stat.h>
 #include <dirent.h>
@@ -443,7 +444,7 @@ struct _snd_config {
                const void *ptr;
                struct {
                        struct list_head fields;
-                       int join;
+                       bool join;
                } compound;
        } u;
        struct list_head list;
@@ -1393,7 +1394,7 @@ static int parse_def(snd_config_t *parent, input_t *input, int skip, int overrid
                                        SNDERR("%s is not a compound", id);
                                        return -EINVAL;
                                }
-                               n->u.compound.join = 1;
+                               n->u.compound.join = true;
                                parent = n;
                                free(id);
                                continue;
@@ -1408,7 +1409,7 @@ static int parse_def(snd_config_t *parent, input_t *input, int skip, int overrid
                err = _snd_config_make_add(&n, &id, SND_CONFIG_TYPE_COMPOUND, parent);
                if (err < 0)
                        goto __end;
-               n->u.compound.join = 1;
+               n->u.compound.join = true;
                parent = n;
        }
        if (c == '=') {