From 33ee4118483111876c00e68004bc50674992eda2 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 2 Jun 2015 08:28:10 +0200 Subject: checksrc: detect fopen() for text without the FOPEN_* macros Follow-up to e8423f9ce150 with discussionis in https://github.com/bagder/curl/pull/258 This check scans for fopen() with a mode string without 'b' present, as it may indicate that an FOPEN_* define should rather be used. --- src/checksrc.whitelist | 2 +- src/tool_operate.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/checksrc.whitelist b/src/checksrc.whitelist index 335d44329..b078ac1ae 100644 --- a/src/checksrc.whitelist +++ b/src/checksrc.whitelist @@ -1,3 +1,3 @@ * 'name=@filename,filename2,filename3' * 'name=@filename;type=image/gif,filename2,filename3' - \ No newline at end of file + file = fopen(name, "r"); /* VMS */ diff --git a/src/tool_operate.c b/src/tool_operate.c index 4c3ed077b..fea587bc9 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -151,7 +151,7 @@ static curl_off_t vms_realfilesize(const char * name, int ret_stat; FILE * file; - file = fopen(name, "r"); + file = fopen(name, "r"); /* VMS */ if(file == NULL) { return 0; } -- cgit v1.2.3