[PATCH 24/25] sound: Use static const char arrays

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
---
 sound/core/misc.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/sound/core/misc.c b/sound/core/misc.c
index 2c41825..0e5e77f 100644
--- a/sound/core/misc.c
+++ b/sound/core/misc.c
@@ -64,12 +64,15 @@ static int print_snd_pfx(unsigned int level, const char *path, int line,
 			 const char *format)
 {
 	const char *file = sanity_file_name(path);
-	char tmp[] = "<0>";
+	char tmp[sizeof("<0>")];
 	const char *pfx = level ? KERN_DEBUG : KERN_DEFAULT;
 	int ret = 0;
 
 	if (format[0] == '<' && format[2] == '>') {
+		tmp[0] = '<';
 		tmp[1] = format[1];
+		tmp[2] = '>';
+		tmp[3] = 0;
 		pfx = tmp;
 		ret = 1;
 	}
-- 
1.7.3.rc1

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux