From 804773eb22691c9f7675bb924eb358946f6f5e75 Mon Sep 17 00:00:00 2001 From: Lekensteyn Date: Wed, 29 Feb 2012 00:10:32 +0100 Subject: [PATCH] Fix misuse of sizeof which trims arguments/muid (GH-12) --- bbswitch.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bbswitch.c b/bbswitch.c index aa0f2a5..c1984f9 100644 --- a/bbswitch.c +++ b/bbswitch.c @@ -71,12 +71,12 @@ static struct notifier_block nb; /* whether the card was off before suspend or not; on: 0, off: 1 */ int dis_before_suspend_disabled; -static char *buffer_to_string(const char buffer[], char *target) { +static char *buffer_to_string(const char *buffer, size_t n, char *target) { int i; - for (i=0; i