if (!c || !c->priv || !e || (e->parent != c)) return;
/* Search the entry */
- for (i = 0; i < c->count; i++) if (c->entries[i] == e) break;
- if (i == c->count) return;
+ for (i = 0; i < c->count; i++)
+ if (c->entries[i] == e)
+ break;
+
+ if (i == c->count)
+ return;
/* Remove the entry */
temp = c->entries[c->count-1];
if (!c || !c->parent) return EXIF_IFD_COUNT;
return
+ ((c)->parent->ifd[EXIF_IFD_EXIF] == (c)) ? EXIF_IFD_EXIF :
((c)->parent->ifd[EXIF_IFD_0] == (c)) ? EXIF_IFD_0 :
((c)->parent->ifd[EXIF_IFD_1] == (c)) ? EXIF_IFD_1 :
- ((c)->parent->ifd[EXIF_IFD_EXIF] == (c)) ? EXIF_IFD_EXIF :
((c)->parent->ifd[EXIF_IFD_GPS] == (c)) ? EXIF_IFD_GPS :
((c)->parent->ifd[EXIF_IFD_INTEROPERABILITY] == (c)) ? EXIF_IFD_INTEROPERABILITY :
EXIF_IFD_COUNT;
/*
* Go through each tag and if it's not recorded, remove it. If one
* is removed, exif_content_foreach_entry() will skip the next entry,
- * so do the loop again from the beginning if this happens to ensure
+ * so if this happens do the loop again from the beginning to ensure
* they're all checked. This could be avoided if we stop relying on
- * exif_content_foreach_entry.
+ * exif_content_foreach_entry but loop intelligently here.
*/
do {
num = c->count;