To avoid warnings on some compilers, return NDN_ERROR_success instead of 0.
diff --git a/ndn-cpp/c/encoding/binary-xml-data.c b/ndn-cpp/c/encoding/binary-xml-data.c
index c02ca70..4533fd0 100644
--- a/ndn-cpp/c/encoding/binary-xml-data.c
+++ b/ndn-cpp/c/encoding/binary-xml-data.c
@@ -30,7 +30,7 @@
if ((error = ndn_BinaryXmlEncoder_writeElementClose(encoder)))
return error;
- return 0;
+ return NDN_ERROR_success;
}
static ndn_Error decodeSignature(struct ndn_Signature *signature, struct ndn_BinaryXmlDecoder *decoder)
@@ -53,13 +53,13 @@
if ((error = ndn_BinaryXmlDecoder_readElementClose(decoder)))
return error;
- return 0;
+ return NDN_ERROR_success;
}
static ndn_Error encodeSignedInfo(struct ndn_SignedInfo *signedInfo, struct ndn_BinaryXmlEncoder *encoder)
{
if (signedInfo->type < 0)
- return 0;
+ return NDN_ERROR_success;
ndn_Error error;
if ((error = ndn_BinaryXmlEncoder_writeElementStartDTag(encoder, ndn_BinaryXml_DTag_SignedInfo)))
@@ -93,7 +93,7 @@
if ((error = ndn_BinaryXmlEncoder_writeElementClose(encoder)))
return error;
- return 0;
+ return NDN_ERROR_success;
}
static ndn_Error decodeSignedInfo(struct ndn_SignedInfo *signedInfo, struct ndn_BinaryXmlDecoder *decoder)
@@ -126,7 +126,7 @@
if ((error = ndn_BinaryXmlDecoder_readElementClose(decoder)))
return error;
- return 0;
+ return NDN_ERROR_success;
}
ndn_Error ndn_encodeBinaryXmlData(struct ndn_Data *data, struct ndn_BinaryXmlEncoder *encoder)
@@ -136,13 +136,13 @@
return error;
if ((error = encodeSignature(&data->signature, encoder)))
- return 0;
+ return NDN_ERROR_success;
if ((error = ndn_encodeBinaryXmlName(&data->name, encoder)))
return error;
if ((error = encodeSignedInfo(&data->signedInfo, encoder)))
- return 0;
+ return NDN_ERROR_success;
if ((error = ndn_BinaryXmlEncoder_writeBlobDTagElement
(encoder, ndn_BinaryXml_DTag_Content, data->content, data->contentLength)))
@@ -151,7 +151,7 @@
if ((error = ndn_BinaryXmlEncoder_writeElementClose(encoder)))
return error;
- return 0;
+ return NDN_ERROR_success;
}
ndn_Error ndn_decodeBinaryXmlData(struct ndn_Data *data, struct ndn_BinaryXmlDecoder *decoder)
@@ -190,5 +190,5 @@
if ((error = ndn_BinaryXmlDecoder_readElementClose(decoder)))
return error;
- return 0;
+ return NDN_ERROR_success;
}