diff options
author | Peter Senna Tschudin <peter.senna@gmail.com> | 2013-09-22 14:44:12 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-09-26 03:57:24 -0400 |
commit | e0f17c75d9352c38926da1b4d8dbefc2d9942006 (patch) | |
tree | 3c489acb0c51ec645c9535a844617547df946097 /sound/usb/mixer.c | |
parent | 43cdd088b1b10306d4eb6d9208b62c7f60abffeb (diff) |
ALSA: Fix assignment of 0/1 to bool variables
Convert 0 to false and 1 to true when assigning values to bool
variables. Inspired by commit 3db1cd5c05f35fb43eb134df6f321de4e63141f2.
The simplified semantic patch that find this problem is as
follows (http://coccinelle.lip6.fr/):
@@
bool b;
@@
(
-b = 0
+b = false
|
-b = 1
+b = true
)
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/mixer.c')
-rw-r--r-- | sound/usb/mixer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index 95558ef4a7a0..44b0ba4feab3 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c | |||
@@ -1151,14 +1151,14 @@ static void check_no_speaker_on_headset(struct snd_kcontrol *kctl, | |||
1151 | const char *names_to_check[] = { | 1151 | const char *names_to_check[] = { |
1152 | "Headset", "headset", "Headphone", "headphone", NULL}; | 1152 | "Headset", "headset", "Headphone", "headphone", NULL}; |
1153 | const char **s; | 1153 | const char **s; |
1154 | bool found = 0; | 1154 | bool found = false; |
1155 | 1155 | ||
1156 | if (strcmp("Speaker", kctl->id.name)) | 1156 | if (strcmp("Speaker", kctl->id.name)) |
1157 | return; | 1157 | return; |
1158 | 1158 | ||
1159 | for (s = names_to_check; *s; s++) | 1159 | for (s = names_to_check; *s; s++) |
1160 | if (strstr(card->shortname, *s)) { | 1160 | if (strstr(card->shortname, *s)) { |
1161 | found = 1; | 1161 | found = true; |
1162 | break; | 1162 | break; |
1163 | } | 1163 | } |
1164 | 1164 | ||