use SS_RC_FIRST and SS_RC_LAST
authorAndreas Steffen <andreas.steffen@strongswan.org>
Thu, 6 Aug 2009 14:42:44 +0000 (16:42 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Thu, 6 Aug 2009 14:42:44 +0000 (16:42 +0200)
src/libstrongswan/utils.h
src/starter/starter.c

index 4e8f685..24634f2 100644 (file)
@@ -35,6 +35,9 @@
 #define SS_RC_DAEMON_INTEGRITY                 65
 #define SS_RC_INITIALIZATION_FAILED            66
 
+#define SS_RC_FIRST    SS_RC_LIBSTRONGSWAN_INTEGRITY
+#define SS_RC_LAST     SS_RC_INITIALIZATION_FAILED
+
 /**
  * Number of bits in a byte
  */
index 72421ca..b675ccf 100644 (file)
@@ -103,8 +103,7 @@ static void fsig(int signal)
                                else if (WIFEXITED(status))
                                {
                                        exit_status =  WEXITSTATUS(status);
-                                       if (exit_status >= SS_RC_LIBSTRONGSWAN_INTEGRITY &&
-                                               exit_status <= SS_RC_INITIALIZATION_FAILED)
+                                       if (exit_status >= SS_RC_FIRST && exit_status <= SS_RC_LAST)
                                        {
                                                _action_ =  FLAG_ACTION_QUIT;
                                        }