for (; length; --length) {
if (*pos1 != *pos2)
- return pos1 - pos2;
+ return *pos1 - *pos2;
++pos1;
++pos2;
}
- return EFI_ST_SUCCESS;
+ return 0;
+}
+
+int efi_st_strcmp_16_8(const u16 *buf1, const char *buf2)
+{
+ for (; *buf1 || *buf2; ++buf1, ++buf2) {
+ if (*buf1 != *buf2)
+ return *buf1 - *buf2;
+ }
+ return 0;
}