summaryrefslogtreecommitdiffstats
path: root/src/tests/asn.1/utility.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/asn.1/utility.c')
-rw-r--r--src/tests/asn.1/utility.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/tests/asn.1/utility.c b/src/tests/asn.1/utility.c
index f2a856af23..00d7f6298b 100644
--- a/src/tests/asn.1/utility.c
+++ b/src/tests/asn.1/utility.c
@@ -15,13 +15,11 @@ asn1_error_code asn1_krb5_data_unparse(code, s)
if (*s != NULL) free(*s);
if (code==NULL) {
- *s = (char*)calloc(strlen("<NULL>")+1, sizeof(char));
+ *s = strdup("<NULL>");
if (*s == NULL) return ENOMEM;
- strcpy(*s,"<NULL>");
} else if (code->data == NULL || ((int) code->length) <= 0) {
- *s = (char*)calloc(strlen("<EMPTY>")+1, sizeof(char));
+ *s = strdup("<EMPTY>");
if (*s==NULL) return ENOMEM;
- strcpy(*s,"<EMPTY>");
} else {
unsigned int i;