diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-03-04 15:45:31 +0200 |
---|---|---|
committer | Konstantin Kostiuk <kkostiuk@redhat.com> | 2024-03-11 18:24:39 +0200 |
commit | 734e7b73dfcbb52ef093663cc31b7d5b9689aa86 (patch) | |
tree | fde512466ebda9da83ad85465b1ccc262f41c7f0 /hw/remote/proxy.c | |
parent | 68bc26717ebf7b7b02f0a0984c78741aede623e1 (diff) | |
download | qemu-734e7b73dfcbb52ef093663cc31b7d5b9689aa86.zip qemu-734e7b73dfcbb52ef093663cc31b7d5b9689aa86.tar.gz qemu-734e7b73dfcbb52ef093663cc31b7d5b9689aa86.tar.bz2 |
qga/commands-win32: Do not set matrix_lookup_t/win_10_0_t arrays size
ga_get_win_name() iterates over all elements in the arrays by
checking the 'version' field is non-NULL. Since the arrays are
guarded by a NULL terminating element, we don't need to specify
their size:
static char *ga_get_win_name(...)
{
...
const ga_matrix_lookup_t *table = WIN_VERSION_MATRIX[tbl_idx];
const ga_win_10_0_t *win_10_0_table = ...
...
while (table->version != NULL) {
^^^^^^^^^^^^^^^
while (win_10_0_table->version != NULL) {
^^^^^^^^^^^^^^^
This will simplify maintenance when adding new entries to these
arrays.
Split WIN_VERSION_MATRIX into WIN_CLIENT_VERSION_MATRIX and
WIN_SERVER_VERSION_MATRIX because multidimensional array must
have bounds for all dimensions except the first.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240222152835.72095-3-philmd@linaro.org>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Reviewed-by: Yan Vugenfirer <yvugenfi@redhat.com>
Link: https://lore.kernel.org/r/20240304134532.28506-3-kkostiuk@redhat.com
Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Diffstat (limited to 'hw/remote/proxy.c')
0 files changed, 0 insertions, 0 deletions