|
@@ -281,9 +281,9 @@ static int nmi_create_files(struct super_block * sb, struct dentry * root)
|
|
|
|
|
|
for (i = 0; i < model->num_counters; ++i) {
|
|
|
struct dentry * dir;
|
|
|
- char buf[2];
|
|
|
+ char buf[4];
|
|
|
|
|
|
- snprintf(buf, 2, "%d", i);
|
|
|
+ snprintf(buf, sizeof(buf), "%d", i);
|
|
|
dir = oprofilefs_mkdir(sb, root, buf);
|
|
|
oprofilefs_create_ulong(sb, dir, "enabled", &counter_config[i].enabled);
|
|
|
oprofilefs_create_ulong(sb, dir, "event", &counter_config[i].event);
|