* [PATCH] ALSA: avoid 'bool' as variable name
@ 2024-02-16 13:02 Arnd Bergmann
2024-02-16 13:47 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2024-02-16 13:02 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai; +Cc: Arnd Bergmann, linux-sound, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
In modern C versions, 'bool' is a keyword that cannot be used as
a variable name, so change this instance use something else, and
change the type to bool instead.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
sound/core/seq/oss/seq_oss_device.h | 2 +-
sound/core/seq/oss/seq_oss_init.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/core/seq/oss/seq_oss_device.h b/sound/core/seq/oss/seq_oss_device.h
index 6c2c4fb9b753..f0e964b19af7 100644
--- a/sound/core/seq/oss/seq_oss_device.h
+++ b/sound/core/seq/oss/seq_oss_device.h
@@ -163,6 +163,6 @@ snd_seq_oss_fill_addr(struct seq_oss_devinfo *dp, struct snd_seq_event *ev,
/* misc. functions for proc interface */
-char *enabled_str(int bool);
+char *enabled_str(bool b);
#endif /* __SEQ_OSS_DEVICE_H */
diff --git a/sound/core/seq/oss/seq_oss_init.c b/sound/core/seq/oss/seq_oss_init.c
index 42d4e7535a82..76bf41c26acd 100644
--- a/sound/core/seq/oss/seq_oss_init.c
+++ b/sound/core/seq/oss/seq_oss_init.c
@@ -455,9 +455,9 @@ snd_seq_oss_reset(struct seq_oss_devinfo *dp)
* misc. functions for proc interface
*/
char *
-enabled_str(int bool)
+enabled_str(bool b)
{
- return bool ? "enabled" : "disabled";
+ return b ? "enabled" : "disabled";
}
static const char *
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ALSA: avoid 'bool' as variable name
2024-02-16 13:02 [PATCH] ALSA: avoid 'bool' as variable name Arnd Bergmann
@ 2024-02-16 13:47 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2024-02-16 13:47 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Jaroslav Kysela, Takashi Iwai, Arnd Bergmann, linux-sound,
linux-kernel
On Fri, 16 Feb 2024 14:02:04 +0100,
Arnd Bergmann wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> In modern C versions, 'bool' is a keyword that cannot be used as
> a variable name, so change this instance use something else, and
> change the type to bool instead.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Thanks, applied.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-16 13:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-16 13:02 [PATCH] ALSA: avoid 'bool' as variable name Arnd Bergmann
2024-02-16 13:47 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox