From 6c118ee8764593d0217a6ae590a2cf2e2edb7602 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Fri, 14 Sep 2012 17:58:53 +0200 Subject: removed unneeded casts --- lib/ASN1.c | 4 ++-- lib/ASN1.y | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/ASN1.c b/lib/ASN1.c index 5289e6a..b6a5844 100644 --- a/lib/ASN1.c +++ b/lib/ASN1.c @@ -2944,7 +2944,7 @@ int asn1_parser2array(const char *inputFileName,const char *outputFileName, if(outputFileName == NULL){ /* file_out_name = inputFileName + _asn1_tab.c */ - file_out_name=(char *)malloc(dot_p-inputFileName+1+ + file_out_name=malloc(dot_p-inputFileName+1+ strlen("_asn1_tab.c")); memcpy(file_out_name,inputFileName,dot_p-inputFileName); file_out_name[dot_p-inputFileName]=0; @@ -2958,7 +2958,7 @@ int asn1_parser2array(const char *inputFileName,const char *outputFileName, if(vectorName == NULL){ /* vector_name = file name + _asn1_tab */ - vector_name=(char *)malloc(dot_p-slash_p+1+ + vector_name=malloc(dot_p-slash_p+1+ strlen("_asn1_tab")); memcpy(vector_name,slash_p,dot_p-slash_p); vector_name[dot_p-slash_p]=0; diff --git a/lib/ASN1.y b/lib/ASN1.y index 0611e85..66173ea 100644 --- a/lib/ASN1.y +++ b/lib/ASN1.y @@ -710,7 +710,7 @@ int asn1_parser2array(const char *inputFileName,const char *outputFileName, if(outputFileName == NULL){ /* file_out_name = inputFileName + _asn1_tab.c */ - file_out_name=(char *)malloc(dot_p-inputFileName+1+ + file_out_name=malloc(dot_p-inputFileName+1+ strlen("_asn1_tab.c")); memcpy(file_out_name,inputFileName,dot_p-inputFileName); file_out_name[dot_p-inputFileName]=0; @@ -724,7 +724,7 @@ int asn1_parser2array(const char *inputFileName,const char *outputFileName, if(vectorName == NULL){ /* vector_name = file name + _asn1_tab */ - vector_name=(char *)malloc(dot_p-slash_p+1+ + vector_name=malloc(dot_p-slash_p+1+ strlen("_asn1_tab")); memcpy(vector_name,slash_p,dot_p-slash_p); vector_name[dot_p-slash_p]=0; -- cgit v1.2.3