qemu-option: simplify search for end of key
commit924e9b0da90ca1fa0de7c5076768a8a9f3795f8d
authorPaolo Bonzini <pbonzini@redhat.com>
Sun, 8 Nov 2020 15:21:21 +0000 (8 10:21 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 15 Dec 2020 17:52:05 +0000 (15 12:52 -0500)
treec00fef787276a3bc2bee655d0732923988514a71
parent4054adbdd2f66d78f73cdce0092eb5513b3b3521
qemu-option: simplify search for end of key

Use strcspn to find an equal or comma value, and pass the result directly
to get_opt_name to avoid another strchr.

Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
util/qemu-option.c