diff options
author | Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> | 2018-07-29 09:41:32 -0300 |
---|---|---|
committer | Arkadiusz Hiler <arkadiusz.hiler@intel.com> | 2018-08-27 14:05:00 +0300 |
commit | c40743d3fce5055682d31610519758dd7379c0f8 (patch) | |
tree | 4931adeb2964ed9ce9bf5017860c4d4c75ba56cb /tools/intel_backlight.c | |
parent | 0bc9763af77bbb37f2ed65cc39c398e88db7d8e3 (diff) |
Make string commands dynamic allocate
This patch fix the following GCC warning:
intel_gvtg_test.c: In function ‘create_guest’:
intel_gvtg_test.c:127:50: warning: ‘%s’ directive writing up to 4095
bytes into a region of size 4077 [-Wformat-overflow=]
[..]
intel_gvtg_test.c:127:5: note: ‘sprintf’ output between 36 and 8226
bytes into a destination of size 4096
[..]
This patch changes the approach for allocating memory to handle QEMU
commands by dynamically allocate space to save the whole command.
Changes since v1:
Arkadiusz Hiler:
- Remove overkill allocation for handling commands
- Remove unnecessary use of memset
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Diffstat (limited to 'tools/intel_backlight.c')
0 files changed, 0 insertions, 0 deletions