[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v7 4/5] efi: Enable booting unified hypervisor/kernel/initrd images
On 29.09.2020 20:17, Trammell Hudson wrote: > +static int __init pe_name_compare(const struct PeSectionHeader *sect, > + const CHAR16 *name) > +{ > + size_t i; > + > + if ( sect->Name[0] != '.' ) > + return -1; > + > + for ( i = 1; i < sizeof(sect->Name); i++ ) > + { > + const char c = sect->Name[i]; > + const CHAR16 cw = name[i - 1]; > + > + if ( cw == L'\0' && c == '\0' ) > + return 0; > + if ( cw != c ) > + return -1; > + } > + > + if ( name[i - 1] == '\0' ) Nit: L'\0' > + return 0; > + > + return -1; > +} You've effectively made the function return boolean now. Please reflect this by making it actually have bool return type and returning true/false (or, for the final return statement, perhaps simply "return name[i - 1] == L'\0'"). Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |