aboutsummaryrefslogtreecommitdiff
path: root/slirp/ncsi.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2018-11-14 16:36:39 +0400
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2019-01-14 00:44:29 +0100
commit37b9117faa7348b33b64a2be03b2e69b568249d8 (patch)
tree51dade5f4208a6cf90064a84f62ab4d4262bc072 /slirp/ncsi.c
parent3a78c2f468e5458a7ce6658296b8af8019361ce6 (diff)
downloadqemu-37b9117faa7348b33b64a2be03b2e69b568249d8.zip
qemu-37b9117faa7348b33b64a2be03b2e69b568249d8.tar.gz
qemu-37b9117faa7348b33b64a2be03b2e69b568249d8.tar.bz2
slirp: replace ARRAY_SIZE with G_N_ELEMENTS
Do not require QEMU macro. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'slirp/ncsi.c')
-rw-r--r--slirp/ncsi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/slirp/ncsi.c b/slirp/ncsi.c
index 10decfb..8594382 100644
--- a/slirp/ncsi.c
+++ b/slirp/ncsi.c
@@ -128,7 +128,7 @@ void ncsi_input(Slirp *slirp, const uint8_t *pkt, int pkt_len)
memset(reh->h_source, 0xff, ETH_ALEN);
reh->h_proto = htons(ETH_P_NCSI);
- for (i = 0; i < ARRAY_SIZE(ncsi_rsp_handlers); i++) {
+ for (i = 0; i < G_N_ELEMENTS(ncsi_rsp_handlers); i++) {
if (ncsi_rsp_handlers[i].type == nh->type + 0x80) {
handler = &ncsi_rsp_handlers[i];
break;