cmocka: Use defines for WILL_RETURN values

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
diff --git a/include/cmocka.h b/include/cmocka.h
index fecd873..282963d 100644
--- a/include/cmocka.h
+++ b/include/cmocka.h
@@ -149,6 +149,9 @@
 #define CMOCKA_DEPRECATED
 #endif
 
+#define WILL_RETURN_ALWAYS -1
+#define WILL_RETURN_ONCE -2
+
 /**
  * @defgroup cmocka_mock Mock Objects
  * @ingroup cmocka
@@ -338,7 +341,7 @@
 void will_return_always(#function, LargestIntegralType value);
 #else
 #define will_return_always(function, value) \
-    will_return_count(function, (value), -1)
+    will_return_count(function, (value), WILL_RETURN_ALWAYS)
 #endif
 
 #ifdef DOXYGEN
@@ -366,7 +369,7 @@
 void will_return_maybe(#function, LargestIntegralType value);
 #else
 #define will_return_maybe(function, value) \
-    will_return_count(function, (value), -2)
+    will_return_count(function, (value), WILL_RETURN_ONCE)
 #endif
 /** @} */
 
diff --git a/src/cmocka.c b/src/cmocka.c
index 9300f04..829dd7a 100644
--- a/src/cmocka.c
+++ b/src/cmocka.c
@@ -691,7 +691,7 @@
             return_value = value_node->refcount;
             if (value_node->refcount - 1 == 0) {
                 list_remove_free(value_node, NULL, NULL);
-            } else if (value_node->refcount > -2) {
+            } else if (value_node->refcount > WILL_RETURN_ONCE) {
                 --value_node->refcount;
             }
         } else {