[hipl-commit] [trunk] Rev 3816: Renamed macro HIP_IFEBL to HIP_IFF and added jump to out_err.

  • From: Tim Just <tim.just@xxxxxxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Fri, 5 Mar 2010 11:01:05 +0200

Committer: Tim Just <tim.just@xxxxxxxxxxxxxx>
Date: Fri Mar 05 09:58:19 2010 +0100
Revision: 3816
Revision-id: tim.just@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  Renamed macro HIP_IFEBL to HIP_IFF and added jump to out_err.
  
  The macro was only used at one position in hipd/update.c. Now the macro
  HIP_IFEL is used at that position with the same effect.

Modified:
  M  hipd/update.c
  M  lib/core/ife.h

=== modified file 'hipd/update.c'
--- hipd/update.c       2010-03-03 15:59:44 +0000
+++ hipd/update.c       2010-03-05 08:58:19 +0000
@@ -184,9 +184,13 @@
     if (type == HIP_UPDATE_ECHO_REQUEST) {
         HIP_HEXDUMP("ECHO_REQUEST in the host association",
                     ha->echo_data, sizeof(ha->echo_data));
-        HIP_IFEBL2(hip_build_param_echo(update_packet_to_send, ha->echo_data,
-                                        sizeof(ha->echo_data), 1, 1),
-                   -1, return err, "Building of ECHO_REQUEST failed\n");
+        HIP_IFEL(hip_build_param_echo(update_packet_to_send,
+                                      ha->echo_data,
+                                      sizeof(ha->echo_data),
+                                      1,
+                                      1),
+                 -1,
+                 "Building of ECHO_REQUEST failed\n");
     }
 
     /* Add ECHO_RESPONSE (signed) */

=== modified file 'lib/core/ife.h'
--- lib/core/ife.h      2010-02-17 17:38:08 +0000
+++ lib/core/ife.h      2010-03-05 08:58:19 +0000
@@ -73,12 +73,13 @@
         } \
     }
 
-#define HIP_IFEBL2(func, eval, finally, args ...) \
+#define HIP_IFF(func, eval, finally, args ...) \
     { \
         if (func) { \
             HIP_ERROR(args); \
             err = eval; \
             finally; \
+            goto out_err; \
         } \
     }

Other related posts:

  • » [hipl-commit] [trunk] Rev 3816: Renamed macro HIP_IFEBL to HIP_IFF and added jump to out_err. - Tim Just