On Mon, Sep 22, 2014 at 08:31:56PM +0000, Pierre Pronchery wrote: > Module Name: src > Committed By: khorben > Date: Mon Sep 22 20:31:56 UTC 2014 > > Modified Files: > src/common/lib/libc/arch/i386/string/small: strchr.S > > Log Message: > Look for the character to locate before checking for the NUL character > > As documented in PR port-i386/49208, this fixes strchr(s, '\0'), as used by > the FAT first-stage bootloader on x86 (bootxx_msdos). > strchr(s, '\0') is otherwise equivalent to strlen(string), which would > probably look nicer in the original file, dosfs.c from libsa.
FWIW 'strchr(s, 0)' is actually 's + strlen(s)' David -- David Laight: da...@l8s.co.uk