/* returns: 1 if image is of given type 0 otherwise (or on error)  */
int fit_image_check_type(const void *fit, int noffset, uint8_t type)
/* returns: 1 if image is of given type 0 otherwise (or on error)  */
int fit_image_check_type(const void *fit, int noffset, uint8_t type)
{
	uint8_t image_type;
	if (fit_image_get_type(fit, noffset, &image_type))
		return 0;
	return (type == image_type);
}