aboutsummaryrefslogtreecommitdiff
path: root/security/tomoyo/tomoyo.c
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>2009-02-12 15:53:38 +0900
committerJames Morris <jmorris@namei.org>2009-02-12 20:21:10 +1100
commit35d50e60e8b12e4adc2fa317343a176d87294a72 (patch)
treed4374d08677dafdf940fc8bdaaadc0aeefa06126 /security/tomoyo/tomoyo.c
parent42d5aaa2d826f54924e260b58a8e410e59d54163 (diff)
downloadvexpress-lsk-35d50e60e8b12e4adc2fa317343a176d87294a72.tar.gz
tomoyo: fix sparse warning
Fix sparse warning. $ make C=2 SUBDIRS=security/tomoyo CF="-D__cold__=" CHECK security/tomoyo/common.c CHECK security/tomoyo/realpath.c CHECK security/tomoyo/tomoyo.c security/tomoyo/tomoyo.c:110:8: warning: symbol 'buf' shadows an earlier one security/tomoyo/tomoyo.c:100:7: originally declared here Signed-off-by: Kentaro Takeda <takedakn@nttdata.co.jp> Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Signed-off-by: Toshiharu Harada <haradats@nttdata.co.jp> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/tomoyo/tomoyo.c')
-rw-r--r--security/tomoyo/tomoyo.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/security/tomoyo/tomoyo.c b/security/tomoyo/tomoyo.c
index f3ab20758c0..cc599b36a3a 100644
--- a/security/tomoyo/tomoyo.c
+++ b/security/tomoyo/tomoyo.c
@@ -107,13 +107,13 @@ static char *tomoyo_sysctl_path(struct ctl_table *table)
*--end = '\0';
buflen--;
while (table) {
- char buf[32];
+ char num[32];
const char *sp = table->procname;
if (!sp) {
- memset(buf, 0, sizeof(buf));
- snprintf(buf, sizeof(buf) - 1, "=%d=", table->ctl_name);
- sp = buf;
+ memset(num, 0, sizeof(num));
+ snprintf(num, sizeof(num) - 1, "=%d=", table->ctl_name);
+ sp = num;
}
if (tomoyo_prepend(&end, &buflen, sp) ||
tomoyo_prepend(&end, &buflen, "/"))