static void increase_dynamic_storage(IVShmemState *s, int new_min_size) {



    int j, old_nb_alloc;



    old_nb_alloc = s->nb_peers;



    while (new_min_size >= s->nb_peers)

        s->nb_peers = s->nb_peers * 2;



    IVSHMEM_DPRINTF("bumping storage to %d guests\n", s->nb_peers);

    s->peers = g_realloc(s->peers, s->nb_peers * sizeof(Peer));



    /* zero out new pointers */

    for (j = old_nb_alloc; j < s->nb_peers; j++) {

        s->peers[j].eventfds = NULL;

        s->peers[j].nb_eventfds = 0;

    }

}

static void increase_dynamic_storage(IVShmemState *s, int new_min_size) {



    int j, old_nb_alloc;



    old_nb_alloc = s->nb_peers;



    while (new_min_size >= s->nb_peers)

        s->nb_peers = s->nb_peers * 2;



    IVSHMEM_DPRINTF("bumping storage to %d guests\n", s->nb_peers);

    s->peers = g_realloc(s->peers, s->nb_peers * sizeof(Peer));



    

    for (j = old_nb_alloc; j < s->nb_peers; j++) {

        s->peers[j].eventfds = NULL;

        s->peers[j].nb_eventfds = 0;

    }

}

static void increase_dynamic_storage(IVShmemState *s, int new_min_size) {     while (new_min_size >= s->nb_peers)         s->nb_peers = s->nb_peers * 2;
static void FUNC_0(IVShmemState *VAR_0, int VAR_1) {



    int VAR_2, VAR_3;



    VAR_3 = VAR_0->nb_peers;



    while (VAR_1 >= VAR_0->nb_peers)

        VAR_0->nb_peers = VAR_0->nb_peers * 2;



    IVSHMEM_DPRINTF("bumping storage to %d guests\n", VAR_0->nb_peers);

    VAR_0->peers = g_realloc(VAR_0->peers, VAR_0->nb_peers * sizeof(Peer));



    

    for (VAR_2 = VAR_3; VAR_2 < VAR_0->nb_peers; VAR_2++) {

        VAR_0->peers[VAR_2].eventfds = NULL;

        VAR_0->peers[VAR_2].nb_eventfds = 0;

    }

}

static void FUNC_0(IVShmemState *VAR_0, int VAR_1) { int VAR_2, VAR_3; VAR_3 = VAR_0->nb_peers; while (VAR_1 >= VAR_0->nb_peers)
VAR_0->nb_peers = VAR_0->nb_peers * 2; IVSHMEM_DPRINTF("bumping storage to %d guests\n", VAR_0->nb_peers); VAR_0->peers = g_realloc(VAR_0->peers, VAR_0->nb_peers * sizeof(Peer)); for (VAR_2 = VAR_3; VAR_2 < VAR_0->nb_peers; VAR_2++) { VAR_0->peers[VAR_2].eventfds = NULL; VAR_0->peers[VAR_2].nb_eventfds = 0; } }