]> git.baikalelectronics.ru Git - kernel.git/commit
Documentation: Fix size parameter for snprintf
authorStefan Weil <sw@weilnetz.de>
Mon, 30 Dec 2013 11:35:43 +0000 (12:35 +0100)
committerJiri Kosina <jkosina@suse.cz>
Thu, 2 Jan 2014 09:47:33 +0000 (10:47 +0100)
commit76f19be53310a5f8dc637721ef607ab20590693d
tree8fe4e4ad8ffb5ea7b0dde6973014308b93d2df9b
parentc8d3a7ee8684d90305bc4134b3340ce0ffa44b26
Documentation: Fix size parameter for snprintf

cppcheck reports this error:

Documentation/laptops/hpfall.c:33]: (error)
 Dangerous usage of 'devname' (strncpy doesn't always 0-terminate it)

The terminating '\0' is needed for the global char array unload_heads_path,
so never write the last array entry (which is initially '\0').

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Documentation/laptops/hpfall.c