Skip to content

Commit c9b72d7

Browse files
Merge pull request #6673 from anhu/readfile
Change ReadFile instances to app-specific naming.
2 parents 65b515a + 30fda7a commit c9b72d7

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

examples/asn1/asn1.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ static Asn1 asn1;
6060
* @return 0 on success.
6161
* @return 1 on failure.
6262
*/
63-
static int ReadFile(FILE* fp, unsigned char** pdata, word32* plen)
63+
static int asn1App_ReadFile(FILE* fp, unsigned char** pdata, word32* plen)
6464
{
6565
int ret = 0;
6666
word32 len = 0;
@@ -121,7 +121,7 @@ static int PrintDer(FILE* fp)
121121
unsigned char* data = NULL;
122122

123123
/* Load DER/BER file. */
124-
if (ReadFile(fp, &data, &len) != 0) {
124+
if (asn1App_ReadFile(fp, &data, &len) != 0) {
125125
ret = 1;
126126
}
127127

@@ -148,7 +148,7 @@ static int PrintBase64(FILE* fp)
148148
unsigned char* data = NULL;
149149

150150
/* Load Base64 encoded file. */
151-
if (ReadFile(fp, &data, &len) != 0) {
151+
if (asn1App_ReadFile(fp, &data, &len) != 0) {
152152
ret = 1;
153153
}
154154

@@ -251,7 +251,7 @@ static int PrintPem(FILE* fp, int pem_skip)
251251
word32 len = 0;
252252

253253
/* Load PEM file. */
254-
if (ReadFile(fp, &data, &len) != 0) {
254+
if (asn1App_ReadFile(fp, &data, &len) != 0) {
255255
ret = 1;
256256
}
257257

examples/pem/pem.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ static int StringToVal(const String2Val* map, int len, const char* str,
9494
* @return 0 on success.
9595
* @return 1 on failure.
9696
*/
97-
static int ReadFile(FILE* fp, unsigned char** pdata, word32* plen)
97+
static int pemApp_ReadFile(FILE* fp, unsigned char** pdata, word32* plen)
9898
{
9999
int ret = 0;
100100
word32 len = 0;
@@ -944,7 +944,7 @@ int main(int argc, char* argv[])
944944
}
945945
#endif
946946
/* Read all of PEM file. */
947-
if ((ret == 0) && (ReadFile(in_file, &in, &in_len) != 0)) {
947+
if ((ret == 0) && (pemApp_ReadFile(in_file, &in, &in_len) != 0)) {
948948
fprintf(stderr, "Reading file failed\n");
949949
ret = 1;
950950
}

0 commit comments

Comments
 (0)