* linux-low.c (linux_wait, linux_send_signal): Don't test
authorDaniel Jacobowitz <drow@false.org>
Fri, 17 Jun 2005 04:01:05 +0000 (04:01 +0000)
committerDaniel Jacobowitz <drow@false.org>
Fri, 17 Jun 2005 04:01:05 +0000 (04:01 +0000)
an unsigned long variable for > 0 if it could be MAX_ULONG.
* server.c (myresume): Likewise.
* target.c (set_desired_inferior): Likewise.

gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-low.c
gdb/gdbserver/server.c
gdb/gdbserver/target.c

index d5882214e1d22df030595b3d558fbc82c9c2929b..4c3e0fef6ff35749c27cb2a8762e895dbeceb4e0 100644 (file)
@@ -1,3 +1,10 @@
+2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * linux-low.c (linux_wait, linux_send_signal): Don't test
+       an unsigned long variable for > 0 if it could be MAX_ULONG.
+       * server.c (myresume): Likewise.
+       * target.c (set_desired_inferior): Likewise.
+
 2005-06-13  Mark Kettenis  <kettenis@gnu.org>
 
        * configure.ac: Simplify and improve check for socklen_t.
index 9e94addd8cea3e21ac77a127ac1ecabefd8f3cd7..fbc3033f6724cfd2b1b794fc987f8b9b1fd8272c 100644 (file)
@@ -667,7 +667,7 @@ retry:
      then we need to make sure we restart the other threads.  We could
      pick a thread at random or restart all; restarting all is less
      arbitrary.  */
-  if (cont_thread > 0)
+  if (cont_thread != 0 && cont_thread != -1)
     {
       child = (struct thread_info *) find_inferior_id (&all_threads,
                                                       cont_thread);
@@ -1435,7 +1435,7 @@ linux_send_signal (int signum)
 {
   extern unsigned long signal_pid;
 
-  if (cont_thread > 0)
+  if (cont_thread != 0 && cont_thread != -1)
     {
       struct process_info *process;
 
index 55f7c2164c6982552b3f785958877c064ccdcd87..b5295bbabf288670742a9e4bad046d9ced9995cc 100644 (file)
@@ -281,7 +281,7 @@ myresume (int step, int sig)
   struct thread_resume resume_info[2];
   int n = 0;
 
-  if (step || sig || cont_thread > 0)
+  if (step || sig || (cont_thread != 0 && cont_thread != -1))
     {
       resume_info[0].thread
        = ((struct inferior_list_entry *) current_inferior)->id;
@@ -293,7 +293,7 @@ myresume (int step, int sig)
   resume_info[n].thread = -1;
   resume_info[n].step = 0;
   resume_info[n].sig = 0;
-  resume_info[n].leave_stopped = (cont_thread > 0);
+  resume_info[n].leave_stopped = (cont_thread != 0 && cont_thread != -1);
 
   (*the_target->resume) (resume_info);
 }
index 0de69e802495c332fb69f7e299b256b07f1ee75e..b9222e2a3b56be007d147c7ba682a9594634edc1 100644 (file)
@@ -42,7 +42,8 @@ set_desired_inferior (int use_general)
       /* If we are continuing any (all) thread(s), use step_thread
         to decide which thread to step and/or send the specified
         signal to.  */
-      if (step_thread > 0 && (cont_thread == 0 || cont_thread == -1))
+      if ((step_thread != 0 && step_thread != -1)
+         && (cont_thread == 0 || cont_thread == -1))
        found = (struct thread_info *) find_inferior_id (&all_threads,
                                                         step_thread);
 
This page took 0.0316959999999999 seconds and 4 git commands to generate.