From 20d548cb7e9291188535aecdbfa2c5edbe41593d Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sun, 7 Jun 2020 20:52:34 +0000 Subject: cleanup git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3851 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- converter/other/fiasco/input/read.c | 2 +- converter/other/fiasco/lib/image.c | 2 +- converter/other/fiasco/lib/image.h | 2 +- converter/other/fiasco/lib/macros.h | 2 -- 4 files changed, 3 insertions(+), 5 deletions(-) (limited to 'converter') diff --git a/converter/other/fiasco/input/read.c b/converter/other/fiasco/input/read.c index b4fcefc5..c3aa77a8 100644 --- a/converter/other/fiasco/input/read.c +++ b/converter/other/fiasco/input/read.c @@ -261,7 +261,7 @@ read_basis (const char *filename, wfa_t *wfa) if (fscanf (input, MAXSTRLEN_SCANF, magic) != 1) error ("Format error: ASCII FIASCO initial basis file %s", filename); - else if (strneq (FIASCO_BASIS_MAGIC, magic)) + else if (!streq (FIASCO_BASIS_MAGIC, magic)) error ("Input file %s is not an ASCII FIASCO initial basis!", filename); } diff --git a/converter/other/fiasco/lib/image.c b/converter/other/fiasco/lib/image.c index 7efade5e..705a56aa 100644 --- a/converter/other/fiasco/lib/image.c +++ b/converter/other/fiasco/lib/image.c @@ -197,7 +197,7 @@ cast_image (fiasco_image_t *image) image_t *this = (image_t *) image->private; if (this) { - if (!streq (this->id, "IFIASCO")) + if (!STRSEQ(this->id, "IFIASCO")) { set_error (_("Parameter `image' doesn't match required type.")); return NULL; diff --git a/converter/other/fiasco/lib/image.h b/converter/other/fiasco/lib/image.h index a87a3c05..c3c5f0df 100644 --- a/converter/other/fiasco/lib/image.h +++ b/converter/other/fiasco/lib/image.h @@ -29,7 +29,7 @@ typedef struct image * Image data */ { - char id [7]; + char id [8]; /* NUL-terminated "IFIASCO" */ unsigned reference_count; unsigned width; /* Width of the image */ unsigned height; /* Height of the image */ diff --git a/converter/other/fiasco/lib/macros.h b/converter/other/fiasco/lib/macros.h index 0bc80e7c..2f404a74 100644 --- a/converter/other/fiasco/lib/macros.h +++ b/converter/other/fiasco/lib/macros.h @@ -34,8 +34,6 @@ *****************************************************************************/ -#define streq(str1, str2) (strcmp ((str1), (str2)) == 0) -#define strneq(str1, str2) (strcmp ((str1), (str2)) != 0) #define square(x) ((x) * (x)) #define first_band(color) ((unsigned) ((color) ? Y : GRAY)) #define last_band(color) ((unsigned) ((color) ? Cr : GRAY)) -- cgit 1.4.1