diff options
| author | David Greenman <dg@FreeBSD.org> | 1994-11-25 08:58:53 +0000 |
|---|---|---|
| committer | David Greenman <dg@FreeBSD.org> | 1994-11-25 08:58:53 +0000 |
| commit | 7e20f2848c62b6e32a8f70ad2f7e5c3bf2642b9f (patch) | |
| tree | 45d04d2db390279dabd36af8785dc599d729b034 /lib/libc | |
| parent | eadf9e27cdb6351c07aab06fe098cbe8b8c63ee2 (diff) | |
Notes
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/i386/string/memchr.S | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/libc/i386/string/memchr.S b/lib/libc/i386/string/memchr.S index a1b2bcc4e2e9..621a7fb2c2c6 100644 --- a/lib/libc/i386/string/memchr.S +++ b/lib/libc/i386/string/memchr.S @@ -27,11 +27,11 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: memchr.S,v 1.2 1994/10/27 11:36:11 bde Exp $ + * $Id: memchr.S,v 1.3 1994/11/25 04:11:19 davidg Exp $ */ #if defined(LIBC_RCS) && !defined(lint) - .asciz "$Id: memchr.S,v 1.2 1994/10/27 11:36:11 bde Exp $" + .asciz "$Id: memchr.S,v 1.3 1994/11/25 04:11:19 davidg Exp $" #endif /* LIBC_RCS and not lint */ #include "DEFS.h" @@ -49,8 +49,7 @@ ENTRY(memchr) movl 8(%esp),%edi /* string address */ movl 12(%esp),%eax /* set character to search for */ movl 16(%esp),%ecx /* set length of search */ - testl %ecx,%ecx /* return NULL if len == 0 */ - jz L1 + testl %esp,%esp /* clear Z flag, for len == 0 */ cld /* set search forward */ repne /* search! */ scasb |
