xref: /csrg-svn/lib/libc/string/bzero.c (revision 30423)
1*30423Smckusick /*
2*30423Smckusick  * Copyright (c) 1987 Regents of the University of California.
3*30423Smckusick  * All rights reserved.  The Berkeley software License Agreement
4*30423Smckusick  * specifies the terms and conditions for redistribution.
5*30423Smckusick  */
6*30423Smckusick 
7*30423Smckusick #if defined(LIBC_SCCS) && !defined(lint)
8*30423Smckusick static char sccsid[] = "@(#)bzero.c	5.1 (Berkeley) 01/27/87";
9*30423Smckusick #endif LIBC_SCCS and not lint
10*30423Smckusick 
11*30423Smckusick /*
12*30423Smckusick  * bzero -- vax movc5 instruction
13*30423Smckusick  */
14*30423Smckusick bzero(b, length)
15*30423Smckusick 	register char *b;
16*30423Smckusick 	register int length;
17*30423Smckusick {
18*30423Smckusick 
19*30423Smckusick 	if (length)
20*30423Smckusick 		do
21*30423Smckusick 			*b++ = '\0';
22*30423Smckusick 		while (--length);
23*30423Smckusick 	return(length);
24*30423Smckusick }
25