From: Jean Delvare Date: Mon, 19 Mar 2007 12:18:53 +0000 (+0100) Subject: [S390] strlcpy is smart enough X-Git-Tag: v2.6.21-rc5~55^2~5 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20cb9e79b963b8f5142e4dd946baf44a75e7935f;p=linux-2.6 [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 Signed-off-by: Andrew Morton Signed-off-by: Martin Schwidefsky --- diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index eca3fe595f..dca6eaf82c 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, rc->level = level; rc->buf_size = buf_size; rc->entry_size = sizeof(debug_entry_t) + buf_size; - strlcpy(rc->name, name, sizeof(rc->name)-1); + strlcpy(rc->name, name, sizeof(rc->name)); memset(rc->views, 0, DEBUG_MAX_VIEWS * sizeof(struct debug_view *)); memset(rc->debugfs_entries, 0 ,DEBUG_MAX_VIEWS * sizeof(struct dentry*));