Fix PR remote/15974
In remote-notif.c:handle_notification, we have a loop,
for (i = 0; i < ARRAY_SIZE (notifs); i++)
{
nc = notifs[i];
if (strncmp (buf, nc->name, strlen (nc->name)) == 0
&& buf[strlen (nc->name)] == ':')
break;
}
/* We ignore notifications we don't recognize, for compatibility
with newer stubs. */
if (nc == NULL)
return;
If the notification is not in the list 'notifs', the last entry is
used, which is wrong. It should be NULL. This patch fixes it.
gdb:
2013-12-02 Pedro Alves <palves@redhat.com>
PR remote/15974
* remote-notif.c (handle_notification): Return early if no
notification is found.