Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 20cb9e79 authored by Jean Delvare's avatar Jean Delvare Committed by Martin Schwidefsky
Browse files

[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: default avatarJean Delvare <khali@linux-fr.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 257c6e1c
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -268,7 +268,7 @@ debug_info_alloc(char *name, int pages_per_area, int nr_areas, int buf_size,
	rc->level          = level;
	rc->level          = level;
	rc->buf_size       = buf_size;
	rc->buf_size       = buf_size;
	rc->entry_size     = sizeof(debug_entry_t) + 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->views, 0, DEBUG_MAX_VIEWS * sizeof(struct debug_view *));
	memset(rc->debugfs_entries, 0 ,DEBUG_MAX_VIEWS *
	memset(rc->debugfs_entries, 0 ,DEBUG_MAX_VIEWS *
		sizeof(struct dentry*));
		sizeof(struct dentry*));