summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMickael Savinaud <savmickael@users.noreply.github.com>2011-08-11 08:21:28 +0000
committerMickael Savinaud <savmickael@users.noreply.github.com>2011-08-11 08:21:28 +0000
commit4f329cbb450e3f8934aa6a378b92e615ca7957a7 (patch)
tree77a58f59ad3054cf61923666b2bf206145160390
parent0e8995aa7e02e6f26c55f28f41f2990d77f011a4 (diff)
fixed wrong patch with the return value of fgets into convert.c file
-rw-r--r--CHANGES3
-rw-r--r--applications/codec/convert.c6
2 files changed, 5 insertions, 4 deletions
diff --git a/CHANGES b/CHANGES
index 1a645c4e..c9f3b724 100644
--- 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.
diff --git a/applications/codec/convert.c b/applications/codec/convert.c
index 18fa03ff..c7afc074 100644
--- a/applications/codec/convert.c
+++ b/applications/codec/convert.c
@@ -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;
}