changeset 178:b0579d4fa186

Made macro MAX_FILESIZE saver with brackets. A perror debugging line.
author Bernhard Reiter <bernhard@intevation.de>
date Tue, 25 Mar 2014 17:21:40 +0100
parents c92297bcda8f
children 8fafd0fc2173
files common/listutil.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/common/listutil.c	Tue Mar 25 16:48:18 2014 +0100
+++ b/common/listutil.c	Tue Mar 25 17:21:40 2014 +0100
@@ -22,7 +22,7 @@
 #include <polarssl/sha256.h>
 #pragma GCC diagnostic pop
 
-#define MAX_FILESIZE MAX_LINE_LENGTH * MAX_LINES
+#define MAX_FILESIZE (MAX_LINE_LENGTH * MAX_LINES)
 
 /**
  *  @brief Read a file into memory.
@@ -192,6 +192,8 @@
         }
         if (ret == READ_FILE_UNREADABLE) {
             /* TODO: work with errno ? */
+	    /* errsv = errno; */
+	    /* perror("read_and_verify_list(), READ_FILE_UNREADABLE:");  */
             return SeekFailed;
         }
         if (ret == READ_FILE_READ_FAILED) {

http://wald.intevation.org/projects/trustbridge/