Re: [PATCH spice-server 06/13] red-channel: Inline red_channel_pipes_create_batch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ping

> 
> ping
> 
> > 
> > ping
> > 
> > > 
> > > The function is called only by red_channel_pipes_new_add.
> > > 
> > > Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> > > ---
> > >  server/red-channel.c | 20 ++++----------------
> > >  1 file changed, 4 insertions(+), 16 deletions(-)
> > > 
> > > diff --git a/server/red-channel.c b/server/red-channel.c
> > > index 82e522395..4872d2807 100644
> > > --- a/server/red-channel.c
> > > +++ b/server/red-channel.c
> > > @@ -598,32 +598,27 @@ static bool
> > > red_channel_no_item_being_sent(RedChannel
> > > *channel)
> > >   * TODO - inline? macro? right now this is the simplest from code amount
> > >   */
> > >  
> > > -typedef void (*rcc_item_t)(RedChannelClient *rcc, RedPipeItem *item);
> > > -
> > >  /**
> > > - * red_channel_pipes_create_batch:
> > > + * red_channel_pipes_new_add:
> > >   * @channel: a channel
> > >   * @creator: a callback to create pipe item (not null)
> > >   * @data: the data to pass to the creator
> > > - * @pipe_add: a callback to add non-null pipe items (not null)
> > >   *
> > >   * Returns: the number of added items
> > >   **/
> > > -static int red_channel_pipes_create_batch(RedChannel *channel,
> > > -                                new_pipe_item_t creator, void *data,
> > > -                                rcc_item_t pipe_add)
> > > +int red_channel_pipes_new_add(RedChannel *channel,
> > > +                              new_pipe_item_t creator, void *data)
> > >  {
> > >      RedChannelClient *rcc;
> > >      RedPipeItem *item;
> > >      int num = 0, n = 0;
> > >  
> > >      spice_assert(creator != NULL);
> > > -    spice_assert(pipe_add != NULL);
> > >  
> > >      FOREACH_CLIENT(channel, rcc) {
> > >          item = (*creator)(rcc, data, num++);
> > >          if (item) {
> > > -            (*pipe_add)(rcc, item);
> > > +            red_channel_client_pipe_add(rcc, item);
> > >              n++;
> > >          }
> > >      }
> > > @@ -631,13 +626,6 @@ static int red_channel_pipes_create_batch(RedChannel
> > > *channel,
> > >      return n;
> > >  }
> > >  
> > > -int red_channel_pipes_new_add(RedChannel *channel,
> > > -                              new_pipe_item_t creator, void *data)
> > > -{
> > > -    return red_channel_pipes_create_batch(channel, creator, data,
> > > -                                          red_channel_client_pipe_add);
> > > -}
> > > -
> > >  uint32_t red_channel_max_pipe_size(RedChannel *channel)
> > >  {
> > >      RedChannelClient *rcc;
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]