<sys/types.h>: Remove wrong #include guard check.
boot: Adjust some printfs which take unsigned but had %d.
boot: Remove an unused variable.
boot: switch limits check and usage of the index in two for()s.