Lines Matching full:if

33  * @param prot true if TLV has to be stored in the protected area, false otherwise
35 * @returns 0 if the TLV iterator was successfully started
45 if (it == NULL || hdr == NULL || fap == NULL) { in bootutil_tlv_iter_begin()
50 if (LOAD_IMAGE_DATA(hdr, fap, off_, &info, sizeof(info))) { in bootutil_tlv_iter_begin()
54 if (info.it_magic == IMAGE_TLV_PROT_INFO_MAGIC) { in bootutil_tlv_iter_begin()
55 if (hdr->ih_protect_tlv_size != info.it_tlv_tot) { in bootutil_tlv_iter_begin()
59 if (LOAD_IMAGE_DATA(hdr, fap, off_ + info.it_tlv_tot, in bootutil_tlv_iter_begin()
63 } else if (hdr->ih_protect_tlv_size != 0) { in bootutil_tlv_iter_begin()
67 if (info.it_magic != IMAGE_TLV_INFO_MAGIC) { in bootutil_tlv_iter_begin()
88 * @param type If not NULL returns the type of TLV found
90 * @returns 0 if a TLV with with matching type was found
91 * 1 if no more TLVs with matching type are available
101 if (it == NULL || it->hdr == NULL || it->fap == NULL) { in bootutil_tlv_iter_next()
106 if (it->hdr->ih_protect_tlv_size > 0 && it->tlv_off == it->prot_end) { in bootutil_tlv_iter_next()
111 if (rc) { in bootutil_tlv_iter_next()
116 if (it->prot && it->tlv_off >= it->prot_end) { in bootutil_tlv_iter_next()
120 if (it->type == IMAGE_TLV_ANY || tlv.it_type == it->type) { in bootutil_tlv_iter_next()
121 if (type != NULL) { in bootutil_tlv_iter_next()
137 * Return if a TLV entry is in the protected area.
142 * @return 0 if this TLV iterator entry is not protected.
143 * 1 if this TLV iterator entry is in the protected region
144 * -1 if the iterator is invalid.
149 if (it == NULL || it->hdr == NULL || it->fap == NULL) { in bootutil_tlv_iter_is_prot()