Use NDN_ERROR_success instead of (ndn_Error)0
diff --git a/ndn-cpp/c/encoding/binary-xml-encoder.h b/ndn-cpp/c/encoding/binary-xml-encoder.h
index 4df49b4..309a789 100644
--- a/ndn-cpp/c/encoding/binary-xml-encoder.h
+++ b/ndn-cpp/c/encoding/binary-xml-encoder.h
@@ -99,7 +99,7 @@
   if (value && valueLength > 0)
     return ndn_BinaryXmlEncoder_writeBlobDTagElement(self, tag, value, valueLength);
   else
-    return (ndn_Error)0;
+    return NDN_ERROR_success;
 }
 
 /**
@@ -133,7 +133,7 @@
   if (value >= 0)
     return ndn_BinaryXmlEncoder_writeUnsignedDecimalIntDTagElement(self, tag, (unsigned int)value);
   else
-    return (ndn_Error)0;
+    return NDN_ERROR_success;
 }
 
 /**
@@ -169,7 +169,7 @@
   if (milliseconds >= 0)
     return ndn_BinaryXmlEncoder_writeTimeMillisecondsDTagElement(self, tag, milliseconds);
   else
-    return (ndn_Error)0;
+    return NDN_ERROR_success;
 }
 
 #ifdef	__cplusplus
diff --git a/ndn-cpp/c/util/dynamic-uchar-array.h b/ndn-cpp/c/util/dynamic-uchar-array.h
index d8d0d23..71b6a2e 100644
--- a/ndn-cpp/c/util/dynamic-uchar-array.h
+++ b/ndn-cpp/c/util/dynamic-uchar-array.h
@@ -58,7 +58,7 @@
 static inline ndn_Error ndn_DynamicUCharArray_ensureLength(struct ndn_DynamicUCharArray *self, unsigned int length) 
 {
   if (self->length >= length)
-    return (ndn_Error)0;
+    return NDN_ERROR_success;
 
   return ndn_DynamicUCharArray_reallocArray(self, length);
 }