This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix a bug in matching notifications.


On 12/10/2013 02:10 PM, Yao Qi wrote:

> 2013-12-10  Yao Qi  <yao@codesourcery.com>
> 
> 	* notif.c (handle_notif_ack): Return 0 if no notification
> 	matches.

OK, thanks.

> @@ -78,20 +78,23 @@ notif_write_event (struct notif_server *notif, char *own_buf)
>  int
>  handle_notif_ack (char *own_buf, int packet_len)
>  {
> -  int i = 0;
> -  struct notif_server *np = NULL;
> +  size_t i = 0;

(There's no real need to initialize 'i' here.)

> +  struct notif_server *np;
>  
>    for (i = 0; i < ARRAY_SIZE (notifs); i++)
>      {

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]