fixed wrong patch with the return value of fgets into convert.c file
authorMickael Savinaud <savmickael@users.noreply.github.com>
Thu, 11 Aug 2011 08:21:28 +0000 (08:21 +0000)
committerMickael Savinaud <savmickael@users.noreply.github.com>
Thu, 11 Aug 2011 08:21:28 +0000 (08:21 +0000)
CHANGES
applications/codec/convert.c

diff --git a/CHANGES b/CHANGES
index 1a645c4e7f3bddfcb54849d9851300001865e13a..c9f3b724e2c19bb4b880469c8cee4be727e22cff 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,9 @@ What's New for OpenJPEG
 ! : changed
 + : added
 
+August 11, 2011
+! [mickael] fixed wrong patch with the return value of fgets into convert.c file
+
 August 10, 2011
 ! [mickael] removed unused parameters warnings with the solution proposed by myself and Bob Friesenhahn.
 ! [mickael] add copyright header into new test functions.
index 18fa03ff34cf8c9654c8a10a0ab8ba1488b38536..c7afc07439773cb684d7bfc966a2f4b88ce32c8e 100644 (file)
@@ -1408,11 +1408,9 @@ static void read_pnm_header(FILE *reader, struct pnm_header *ph)
     char idf[256], type[256];
     char line[256];
 
-    char* return_value_fgets = fgets(line, 250, reader);
-    if (!strcmp(return_value_fgets,line))
+    if (fgets(line, 250, reader) == NULL)
     {
-       fprintf(stderr,"\nWARNING: fgets return a value different that the first argument");
-       free(return_value_fgets);
+       fprintf(stderr,"\nWARNING: fgets return a NULL value");
        return;
     }