diff options
author | roel kluin <roel.kluin@gmail.com> | 2009-07-20 20:17:17 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-08-19 20:12:29 -0400 |
commit | 2e2ddb24d36106e029f6eeb3df611178a36fb295 (patch) | |
tree | 7c76d5f2d43933a86cd834c8b28290d9c501cdae /arch/powerpc/platforms/cell | |
parent | c5a8c0c99f67ae8a784faafbaaea1529825796e2 (diff) |
powerpc/cell: Replace strncpy by strlcpy
Replace strncpy() and explicit null-termination by strlcpy()
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/cell')
-rw-r--r-- | arch/powerpc/platforms/cell/celleb_setup.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/cell/celleb_setup.c b/arch/powerpc/platforms/cell/celleb_setup.c index 07c234f6b2b6..e53845579770 100644 --- a/arch/powerpc/platforms/cell/celleb_setup.c +++ b/arch/powerpc/platforms/cell/celleb_setup.c | |||
@@ -80,8 +80,7 @@ static void celleb_show_cpuinfo(struct seq_file *m) | |||
80 | 80 | ||
81 | static int __init celleb_machine_type_hack(char *ptr) | 81 | static int __init celleb_machine_type_hack(char *ptr) |
82 | { | 82 | { |
83 | strncpy(celleb_machine_type, ptr, sizeof(celleb_machine_type)); | 83 | strlcpy(celleb_machine_type, ptr, sizeof(celleb_machine_type)); |
84 | celleb_machine_type[sizeof(celleb_machine_type)-1] = 0; | ||
85 | return 0; | 84 | return 0; |
86 | } | 85 | } |
87 | 86 | ||