summaryrefslogtreecommitdiffstats
path: root/arch/s390/appldata
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/appldata')
-rw-r--r--arch/s390/appldata/appldata_base.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c
index ee6a9c387c87..25c1399b0787 100644
--- a/arch/s390/appldata/appldata_base.c
+++ b/arch/s390/appldata/appldata_base.c
@@ -214,8 +214,7 @@ appldata_timer_handler(struct ctl_table *ctl, int write,
214 return 0; 214 return 0;
215 } 215 }
216 if (!write) { 216 if (!write) {
217 strncpy(buf, appldata_timer_active ? "1\n" : "0\n", 217 memcpy(buf, appldata_timer_active ? "1\n" : "0\n", ARRAY_SIZE(buf));
218 ARRAY_SIZE(buf));
219 len = strnlen(buf, ARRAY_SIZE(buf)); 218 len = strnlen(buf, ARRAY_SIZE(buf));
220 if (len > *lenp) 219 if (len > *lenp)
221 len = *lenp; 220 len = *lenp;
@@ -323,7 +322,7 @@ appldata_generic_handler(struct ctl_table *ctl, int write,
323 return 0; 322 return 0;
324 } 323 }
325 if (!write) { 324 if (!write) {
326 strncpy(buf, ops->active ? "1\n" : "0\n", ARRAY_SIZE(buf)); 325 memcpy(buf, ops->active ? "1\n" : "0\n", ARRAY_SIZE(buf));
327 len = strnlen(buf, ARRAY_SIZE(buf)); 326 len = strnlen(buf, ARRAY_SIZE(buf));
328 if (len > *lenp) 327 if (len > *lenp)
329 len = *lenp; 328 len = *lenp;