]> arthur.barton.de Git - netatalk.git/blobdiff - include/atalk/errchk.h
I've set my first POSIX 1e ACL, now nice
[netatalk.git] / include / atalk / errchk.h
index 00ae8b64042f9c7bf8465a3436d9fd5788ee0284..f0d8ca4ee1172cf2ab31adcae99770ab20ef2796 100644 (file)
@@ -62,7 +62,6 @@
         }                                                               \
     } while (0)
 
-/* check for return val 0 which is ok, every other is an error */
 #define EC_ZERO(a) \
     do { \
         if ((a) != 0) { \
         } \
     } while (0)
 
-/* check for return val 0 which is ok, every other is an error */
+#define EC_ZERO_ERR(a,b )                       \
+    do {                                        \
+        if ((a) != 0) {                         \
+            ret = b;                            \
+            goto cleanup;                       \
+        }                                       \
+    } while (0)
+
 #define EC_ZERO_CUSTOM(a) \
     (ret = (a)) != 0