]> sourceware.org Git - lvm2.git/commit
Replace dm_snprintf with strncpy
authorZdenek Kabelac <zkabelac@redhat.com>
Tue, 12 Apr 2011 14:13:17 +0000 (14:13 +0000)
committerZdenek Kabelac <zkabelac@redhat.com>
Tue, 12 Apr 2011 14:13:17 +0000 (14:13 +0000)
commitefc5d04ec7a0fb288549b5040dce40cbf7658b32
tree44620c60c99a2192fa0f7ff6e70ffa1cb0c65465
parentba7d6c9dd02dc93be5956a2ccb9135ce0955d314
Replace dm_snprintf with strncpy

My previous patch fixed incorrect error check for dm_snprintf.
However in this particular case - dm_snprintf has been used differently -
just like strncpy + setting last char with '\0' - so the code had to return
error - because the buffer was to short for whole string.

Patch replaces it with real strncpy.
Also test for alloca() failure is removed - as the program behaviour
is rather undefined in this case - it never returns NULL.
lib/metadata/mirror.c
This page took 0.039204 seconds and 5 git commands to generate.