aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2015-03-21 16:21:01 +0100
committerDaniel Stenberg <daniel@haxx.se>2015-03-21 16:21:01 +0100
commite6917d3b77af3f6286bda28cdf271bc37c00ff8e (patch)
treed793f1276a9f38330be545d6bd338a8ec2a0349b /lib
parent57dc2f7e4047fccce93f7feac31750a02d47ff8e (diff)
x509asn1: minor edit to unconfuse Coverity
CID 1202732 warns on the previous use, although I cannot fine any problems with it. I'm doing this change only to make the code use a more familiar approach to accomplish the same thing.
Diffstat (limited to 'lib')
-rw-r--r--lib/x509asn1.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/x509asn1.c b/lib/x509asn1.c
index 8b32d6bf7..c3ddc3834 100644
--- a/lib/x509asn1.c
+++ b/lib/x509asn1.c
@@ -536,8 +536,6 @@ static const char * UTime2str(const char * beg, const char * end)
const char * Curl_ASN1tostr(curl_asn1Element * elem, int type)
{
- static const char zero = '\0';
-
/* Convert an ASN.1 element to a printable string.
Return the dynamically allocated string, or NULL if an error occurs. */
@@ -558,7 +556,7 @@ const char * Curl_ASN1tostr(curl_asn1Element * elem, int type)
case CURL_ASN1_OCTET_STRING:
return octet2str(elem->beg, elem->end);
case CURL_ASN1_NULL:
- return strdup(&zero);
+ return strdup("");
case CURL_ASN1_OBJECT_IDENTIFIER:
return OID2str(elem->beg, elem->end, TRUE);
case CURL_ASN1_UTC_TIME: