diff options
author | Anton Lundin <glance@acc.umu.se> | 2013-12-11 00:53:32 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-12-11 03:13:30 +0100 |
commit | 9f7102f9da0646e36279edf1dbe4c481af221546 (patch) | |
tree | da3a7686ac6aa543d832284c3821dd7b4d14c8ca /file.c | |
parent | c46ae27c3b24c92fcb4cf8723366bc5e61ae05b3 (diff) | |
download | subsurface-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.c | 10 |
1 files changed, 0 insertions, 10 deletions
@@ -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; |