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]

[OB] gdb_wait_for_event, statement "escaped" from if block


I think this one's pretty obvious -- the statement has to be inside the if.

2007-08-16  Michael Snyder  <msnyder@access-company.com>

        * event-loop.c (gdb_wait_for_event): Move statement into "if" block.

*** event-loop.c        9 Jan 2007 17:58:50 -0000       1.30
--- event-loop.c        16 Aug 2007 14:45:59 -0000
*************** gdb_wait_for_event (void)
*** 819,839 ****
          if (file_ptr)
            {
              /* Enqueue an event only if this is still a new event for
                 this fd. */
              if (file_ptr->ready_mask == 0)
                {
                  file_event_ptr = create_file_event (file_ptr->fd);
                  async_queue_event (file_event_ptr, TAIL);
                }
            }
-
-         file_ptr->ready_mask = (gdb_notifier.poll_fds + i)->revents;
        }
  #else
        internal_error (__FILE__, __LINE__,
                      _("use_poll without HAVE_POLL"));
  #endif /* HAVE_POLL */
      }
    else
      {
        for (file_ptr = gdb_notifier.first_file_handler;
--- 819,838 ----
          if (file_ptr)
            {
              /* Enqueue an event only if this is still a new event for
                 this fd. */
              if (file_ptr->ready_mask == 0)
                {
                  file_event_ptr = create_file_event (file_ptr->fd);
                  async_queue_event (file_event_ptr, TAIL);
                }
+             file_ptr->ready_mask = (gdb_notifier.poll_fds + i)->revents;
            }
        }
  #else
        internal_error (__FILE__, __LINE__,
                      _("use_poll without HAVE_POLL"));
  #endif /* HAVE_POLL */
      }
    else
      {
        for (file_ptr = gdb_notifier.first_file_handler;



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