diff options
| author | Jeff Cody | 2015-01-22 14:03:29 +0100 |
|---|---|---|
| committer | Kevin Wolf | 2015-01-23 18:17:06 +0100 |
| commit | 1d33936ea847693a6d69f9049691a0341d6e0b9f (patch) | |
| tree | 1aa5c98c41e249c39d3aa3d4c08df4b2f975efe1 /scripts/switch-timer-api | |
| parent | block: remove unused variable in bdrv_commit (diff) | |
| download | qemu-1d33936ea847693a6d69f9049691a0341d6e0b9f.tar.gz qemu-1d33936ea847693a6d69f9049691a0341d6e0b9f.tar.xz qemu-1d33936ea847693a6d69f9049691a0341d6e0b9f.zip | |
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>
Diffstat (limited to 'scripts/switch-timer-api')
0 files changed, 0 insertions, 0 deletions
