remove pointless strncmp pointed out by patrick <sidsrr@yahoo.com>

This commit is contained in:
pvalchev 2005-11-14 17:39:03 +00:00
parent b3c414c608
commit d349e9f92c
6 changed files with 6 additions and 72 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.2 2004/05/18 20:52:48 naddy Exp $
# $OpenBSD: Makefile,v 1.3 2005/11/14 17:39:03 pvalchev Exp $
COMMENT= "interface to read EXIF tags in JPEG images"
DISTNAME= Image-EXIF-0.98.6
PKGNAME= p5-${DISTNAME}
PKGNAME= p5-${DISTNAME}p0
CATEGORIES= graphics perl5
HOMEPAGE= http://search.cpan.org/dist/Image-EXIF/

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-canon_c,v 1.1.1.1 2004/05/17 05:09:52 robert Exp $
$OpenBSD: patch-canon_c,v 1.2 2005/11/14 17:39:03 pvalchev Exp $
--- canon.c.orig 2004-05-03 11:31:28.000000000 -0700
+++ canon.c 2004-05-03 11:56:30.000000000 -0700
@@ -775,14 +775,14 @@ canon_prop01(struct exifprop *aprop, str
@ -30,24 +30,6 @@ $OpenBSD: patch-canon_c,v 1.1.1.1 2004/05/17 05:09:52 robert Exp $
(float)exif2byte(off + 37 * 2, o) /
(float)exif2byte(off + 36 * 2, o));
} else
@@ -802,7 +802,7 @@ canon_prop01(struct exifprop *aprop, str
break;
case 16:
/* ISO overrides standard one if known. */
- if (!strcmp(aprop->str, "Unknown")) {
+ if (!strncmp(aprop->str, "Unknown", 7)) {
aprop->lvl = ED_VRB;
break;
}
@@ -810,7 +810,7 @@ canon_prop01(struct exifprop *aprop, str
break;
case 17:
/* Maker meter mode overrides standard one if known. */
- if (!strcmp(aprop->str, "Unknown")) {
+ if (!strncmp(aprop->str, "Unknown", 7)) {
aprop->lvl = ED_VRB;
break;
}
@@ -857,8 +857,8 @@ canon_propA0(struct exifprop *aprop, str
switch (aprop->tag) {

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-minolta_c,v 1.1.1.1 2004/05/17 05:09:53 robert Exp $
$OpenBSD: patch-minolta_c,v 1.2 2005/11/14 17:39:03 pvalchev Exp $
--- minolta.c.orig 2004-05-03 11:35:20.000000000 -0700
+++ minolta.c 2004-05-03 11:56:00.000000000 -0700
@@ -484,10 +484,10 @@ minolta_cprop(struct exifprop *prop, uns
@ -113,21 +113,3 @@ $OpenBSD: patch-minolta_c,v 1.1.1.1 2004/05/17 05:09:53 robert Exp $
prop->lvl = ED_BAD;
}
@@ -699,7 +699,7 @@ minolta_prop(struct exifprop *prop, stru
/* We recognize two types: MLT0 and mlt0. */
- if (strcmp(prop->str, "MLT0") && strcmp(prop->str, "mlt0"))
+ if (strncmp(prop->str, "MLT0", 4) && strncmp(prop->str, "mlt0", 4))
exifwarn2("Minolta maker note version not supported",
prop->str);
break;
@@ -793,7 +793,7 @@ minolta_ifd(u_int32_t offset, struct tif
/* DiMAGE E201. */
- if (!strcmp((const char *)(md->btiff + offset), "+M")) {
+ if (!strncmp((const char *)(md->btiff + offset), "+M", 2)) {
exifwarn("Minolta maker note version not supported");
return (NULL);
}

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-nikon_c,v 1.1.1.1 2004/05/17 05:09:53 robert Exp $
--- nikon.c.orig 2004-05-03 11:57:47.000000000 -0700
+++ nikon.c 2004-05-03 11:57:27.000000000 -0700
@@ -294,7 +294,7 @@ nikon_ifd(u_int32_t offset, struct tiffm
* Seems that some Nikon maker notes start with an ID string.
*/
- if (!strcmp((const char *)b, "Nikon")) {
+ if (!strncmp((const char *)b, "Nikon", 5)) {
b += 6;
switch (exif2byte(b, md->order)) {

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-olympus_c,v 1.1.1.1 2004/05/17 05:09:53 robert Exp $
$OpenBSD: patch-olympus_c,v 1.2 2005/11/14 17:39:03 pvalchev Exp $
--- olympus.c.orig 2004-05-03 11:49:52.000000000 -0700
+++ olympus.c 2004-05-03 11:58:11.000000000 -0700
@@ -144,16 +144,16 @@ olympus_prop(struct exifprop *prop, stru
@ -22,12 +22,3 @@ $OpenBSD: patch-olympus_c,v 1.1.1.1 2004/05/17 05:09:53 robert Exp $
prop->value % 10000);
break;
}
@@ -173,7 +173,7 @@ olympus_ifd(u_int32_t offset, struct tif
* try reading the IFD starting at offset + 8 ("OLYMP" + 3).
*/
- if (!strcmp((const char *)(md->btiff + offset), "OLYMP"))
+ if (!strncmp((const char *)(md->btiff + offset), "OLYMP", 5))
readifd(offset + strlen("OLYMP") + 3, &myifd, olympus_tags, md);
else
readifd(offset, &myifd, olympus_tags, md);

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-sanyo_c,v 1.1.1.1 2004/05/17 05:09:53 robert Exp $
$OpenBSD: patch-sanyo_c,v 1.2 2005/11/14 17:39:03 pvalchev Exp $
--- sanyo.c.orig 2004-05-03 11:50:01.000000000 -0700
+++ sanyo.c 2004-05-03 11:58:29.000000000 -0700
@@ -318,7 +318,7 @@ sanyo_prop(struct exifprop *prop, struct
@ -22,12 +22,3 @@ $OpenBSD: patch-sanyo_c,v 1.1.1.1 2004/05/17 05:09:53 robert Exp $
break;
/* Color adjust. */
@@ -357,7 +357,7 @@ sanyo_ifd(u_int32_t offset, struct tiffm
* try reading the IFD starting at offset + 8 ("SANYO" + 3).
*/
- if (!strcmp((const char *)(md->btiff + offset), "SANYO"))
+ if (!strncmp((const char *)(md->btiff + offset), "SANYO", 5))
readifd(offset + strlen("SANYO") + 3, &myifd, sanyo_tags, md);
else
readifd(offset, &myifd, sanyo_tags, md);