aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 f3ab20758c0f..cc599b36a3a8 100644
--- a/security/tomoyo/tomoyo.c
+++ b/security/tomoyo/tomoyo.c
@@ -107,13 +107,13 @@ static char *tomoyo_sysctl_path(struct ctl_table *table)
107 *--end = '\0'; 107 *--end = '\0';
108 buflen--; 108 buflen--;
109 while (table) { 109 while (table) {
110 char buf[32]; 110 char num[32];
111 const char *sp = table->procname; 111 const char *sp = table->procname;
112 112
113 if (!sp) { 113 if (!sp) {
114 memset(buf, 0, sizeof(buf)); 114 memset(num, 0, sizeof(num));
115 snprintf(buf, sizeof(buf) - 1, "=%d=", table->ctl_name); 115 snprintf(num, sizeof(num) - 1, "=%d=", table->ctl_name);
116 sp = buf; 116 sp = num;
117 } 117 }
118 if (tomoyo_prepend(&end, &buflen, sp) || 118 if (tomoyo_prepend(&end, &buflen, sp) ||
119 tomoyo_prepend(&end, &buflen, "/")) 119 tomoyo_prepend(&end, &buflen, "/"))