aboutsummaryrefslogtreecommitdiff
path: root/util/qemu-option.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/qemu-option.c')
-rw-r--r--util/qemu-option.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/util/qemu-option.c b/util/qemu-option.c
index 19761e3eaf..01886efe90 100644
--- a/util/qemu-option.c
+++ b/util/qemu-option.c
@@ -82,11 +82,9 @@ const char *get_opt_value(const char *p, char **value)
if (*offset != '\0' && *(offset + 1) == ',') {
length++;
}
- if (value) {
- *value = g_renew(char, *value, capacity + length + 1);
- strncpy(*value + capacity, p, length);
- (*value)[capacity + length] = '\0';
- }
+ *value = g_renew(char, *value, capacity + length + 1);
+ strncpy(*value + capacity, p, length);
+ (*value)[capacity + length] = '\0';
capacity += length;
if (*offset == '\0' ||
*(offset + 1) != ',') {