]> err.no Git - linux-2.6/commitdiff
[S390] strlcpy is smart enough
authorJean Delvare <khali@linux-fr.org>
Mon, 19 Mar 2007 12:18:53 +0000 (13:18 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 19 Mar 2007 12:18:53 +0000 (13:18 +0100)
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>
arch/s390/kernel/debug.c

index eca3fe595ff4a9b092b6ee8f89f69309731add77..dca6eaf82c80859a847802a1d6e975e8682a7691 100644 (file)
@@ -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*));