about summary refs log tree commit diff
path: root/converter/other/jpeg2000
diff options
context:
space:
mode:
Diffstat (limited to 'converter/other/jpeg2000')
-rw-r--r--converter/other/jpeg2000/libjasper/jpc/jpc_util.c4
-rw-r--r--converter/other/jpeg2000/pamtojpeg2k.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/converter/other/jpeg2000/libjasper/jpc/jpc_util.c b/converter/other/jpeg2000/libjasper/jpc/jpc_util.c
index 82f4b285..ecc4b914 100644
--- a/converter/other/jpeg2000/libjasper/jpc/jpc_util.c
+++ b/converter/other/jpeg2000/libjasper/jpc/jpc_util.c
@@ -151,7 +151,7 @@ int jpc_atoaf(const char *s, int *numvalues, double **values)
 	if ((cp = strtok(buf, delim))) {
 		++n;
 		while ((cp = strtok(0, delim))) {
-			if (cp != '\0') {
+			if (cp[0] != '\0') {
 				++n;
 			}
 		}
@@ -169,7 +169,7 @@ int jpc_atoaf(const char *s, int *numvalues, double **values)
 			vs[n] = atof(cp);
 			++n;
 			while ((cp = strtok(0, delim))) {
-				if (cp != '\0') {
+				if (cp[0] != '\0') {
 					vs[n] = atof(cp);
 					++n;
 				}
diff --git a/converter/other/jpeg2000/pamtojpeg2k.c b/converter/other/jpeg2000/pamtojpeg2k.c
index 70774725..69ceb22b 100644
--- a/converter/other/jpeg2000/pamtojpeg2k.c
+++ b/converter/other/jpeg2000/pamtojpeg2k.c
@@ -348,7 +348,7 @@ convertToJasperImage(struct pam *   const inpamP,
                                   JAS_IMAGE_CT_COLOR(JAS_IMAGE_CT_RGB_B));
         }
     } else {
-        if (strncmp(inpamP->tuple_type, "GRAYSCALE", 9 == 0) ||
+        if (strncmp(inpamP->tuple_type, "GRAYSCALE", 9) == 0 ||
             strncmp(inpamP->tuple_type, "BLACKANDWHITE", 13) == 0) {
             jas_image_setclrspc(jasperP, JAS_CLRSPC_GENGRAY);
             jas_image_setcmpttype(jasperP, 0,