aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2013-12-11 00:53:32 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-12-11 03:13:30 +0100
commit9f7102f9da0646e36279edf1dbe4c481af221546 (patch)
treeda3a7686ac6aa543d832284c3821dd7b4d14c8ca /file.c
parentc46ae27c3b24c92fcb4cf8723366bc5e61ae05b3 (diff)
downloadsubsurface-9f7102f9da0646e36279edf1dbe4c481af221546.tar.gz
Remove redundant readfile() in parse_csv_file
try_to_xslt_open_csv will read the file, so we don't need to do it before that and leak that memory. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'file.c')
-rw-r--r--file.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/file.c b/file.c
index 1e141b708..08c6a8309 100644
--- a/file.c
+++ b/file.c
@@ -394,16 +394,6 @@ void parse_csv_file(const char *filename, int timef, int depthf, int tempf, int
if (filename == NULL)
return;
- if (readfile(filename, &mem) < 0) {
- if (error) {
- int len = strlen(translate("gettextFromC","Failed to read '%s'")) + strlen(filename);
- *error = malloc(len);
- snprintf(*error, len, translate("gettextFromC","Failed to read '%s'"), filename);
- }
-
- return;
- }
-
if (try_to_xslt_open_csv(filename, &mem, error))
return;