Home
last modified time | relevance | path

Searched hist:"1 d33936e" (Results 1 – 1 of 1) sorted by relevance

/qemu/block/
H A Dmirror.c1d33936e Thu Jan 22 13:03:29 GMT 2015 Jeff Cody <jcody@redhat.com> block: mirror - change string allocation to 2-bytes

The backing_filename string in mirror_run() is only used to check
for a NULL string, so we don't need to allocate 1024 bytes (or, later,
PATH_MAX bytes), when we only need to copy the first 2 characters.

We technically only need 1 byte, as we are just checking for NULL, but
since backing_filename[] is populated by bdrv_get_backing_filename(), a
string size of 1 will always only return '\0';

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>