aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2007-03-19 08:18:53 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2007-03-19 08:18:53 -0400
commit20cb9e79b963b8f5142e4dd946baf44a75e7935f (patch)
tree50a4df05a6b6783652637ac0f534a60a2c5092ea /arch
parent257c6e1ce8f875dd02220e90cf38e615e47788fe (diff)
[S390] strlcpy is smart enough
strlcpy already accounts for the trailing zero in its length computation, so there is no need to substract one to the buffer size. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/s390/kernel/debug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c
index eca3fe595ff4..dca6eaf82c80 100644
--- a/arch/s390/kernel/debug.c
+++ b/arch/s390/kernel/debug.c
@@ -268,7 +268,7 @@ debug_info_alloc(char *name, int pages_per_area, int nr_areas, int buf_size,
268 rc->level = level; 268 rc->level = level;
269 rc->buf_size = buf_size; 269 rc->buf_size = buf_size;
270 rc->entry_size = sizeof(debug_entry_t) + buf_size; 270 rc->entry_size = sizeof(debug_entry_t) + buf_size;
271 strlcpy(rc->name, name, sizeof(rc->name)-1); 271 strlcpy(rc->name, name, sizeof(rc->name));
272 memset(rc->views, 0, DEBUG_MAX_VIEWS * sizeof(struct debug_view *)); 272 memset(rc->views, 0, DEBUG_MAX_VIEWS * sizeof(struct debug_view *));
273 memset(rc->debugfs_entries, 0 ,DEBUG_MAX_VIEWS * 273 memset(rc->debugfs_entries, 0 ,DEBUG_MAX_VIEWS *
274 sizeof(struct dentry*)); 274 sizeof(struct dentry*));