Merge pull request #6673 from anhu/readfile

Change ReadFile instances to app-specific naming.
This commit is contained in:
JacobBarthelmeh 2023-08-04 13:48:49 -06:00 committed by GitHub
commit c9b72d7b61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -60,7 +60,7 @@ static Asn1 asn1;
* @return 0 on success.
* @return 1 on failure.
*/
static int ReadFile(FILE* fp, unsigned char** pdata, word32* plen)
static int asn1App_ReadFile(FILE* fp, unsigned char** pdata, word32* plen)
{
int ret = 0;
word32 len = 0;
@ -121,7 +121,7 @@ static int PrintDer(FILE* fp)
unsigned char* data = NULL;
/* Load DER/BER file. */
if (ReadFile(fp, &data, &len) != 0) {
if (asn1App_ReadFile(fp, &data, &len) != 0) {
ret = 1;
}
@ -148,7 +148,7 @@ static int PrintBase64(FILE* fp)
unsigned char* data = NULL;
/* Load Base64 encoded file. */
if (ReadFile(fp, &data, &len) != 0) {
if (asn1App_ReadFile(fp, &data, &len) != 0) {
ret = 1;
}
@ -251,7 +251,7 @@ static int PrintPem(FILE* fp, int pem_skip)
word32 len = 0;
/* Load PEM file. */
if (ReadFile(fp, &data, &len) != 0) {
if (asn1App_ReadFile(fp, &data, &len) != 0) {
ret = 1;
}

View File

@ -94,7 +94,7 @@ static int StringToVal(const String2Val* map, int len, const char* str,
* @return 0 on success.
* @return 1 on failure.
*/
static int ReadFile(FILE* fp, unsigned char** pdata, word32* plen)
static int pemApp_ReadFile(FILE* fp, unsigned char** pdata, word32* plen)
{
int ret = 0;
word32 len = 0;
@ -944,7 +944,7 @@ int main(int argc, char* argv[])
}
#endif
/* Read all of PEM file. */
if ((ret == 0) && (ReadFile(in_file, &in, &in_len) != 0)) {
if ((ret == 0) && (pemApp_ReadFile(in_file, &in, &in_len) != 0)) {
fprintf(stderr, "Reading file failed\n");
ret = 1;
}