This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix a bug in matching notifications.
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 10 Dec 2013 14:48:17 +0000
- Subject: Re: [PATCH] Fix a bug in matching notifications.
- Authentication-results: sourceware.org; auth=none
- References: <1386684626-11415-1-git-send-email-yao at codesourcery dot com>
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