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]

[PATCH] Remove harcoded constants in remote.c:watchpoint_to_Z_packet


This is a trivial change replacing hardcoded constants with already existing 
enumerators.

Changelog entry:

2005-11-14  Vladimir Prus  <ghost@cs.msu.su>

        * remote.c (watchpoint_to_Z_packet): Use values of Z_packet_type enum
          instead of hardcoded integer literals.

Patch attached.
Index: remote.c
===================================================================
--- remote.c	(revision 1696)
+++ remote.c	(working copy)
@@ -4505,13 +4505,13 @@
   switch (type)
     {
     case hw_write:
-      return 2;
+      return Z_PACKET_WRITE_WP;
       break;
     case hw_read:
-      return 3;
+      return Z_PACKET_READ_WP;
       break;
     case hw_access:
-      return 4;
+      return Z_PACKET_ACCESS_WP;
       break;
     default:
       internal_error (__FILE__, __LINE__,

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