if (!id ||
relative <= 0 ? (id - all_ids) + relative < 0 :
- (id - all_ids) + relative >= count)
+ (id - all_ids) + relative >= (int) count)
return -EADDRNOTAVAIL;
*boot_id = (id + relative)->id;
offset = arg_boot_descriptor + 32;
- if (*offset != '-' && *offset != '+') {
+ if (*offset && *offset != '-' && *offset != '+') {
log_error("Relative boot ID offset must start with a '+' or a '-', found '%s' ", offset);
return -EINVAL;
}