memset.c revision 7257d1b4d25bfac0c802847390e98a464fd787ac
19d3aba12c70528708be9440aca66038a291f29eYassir Elley * CDDL HEADER START
19d3aba12c70528708be9440aca66038a291f29eYassir Elley * The contents of this file are subject to the terms of the
19d3aba12c70528708be9440aca66038a291f29eYassir Elley * Common Development and Distribution License (the "License").
19d3aba12c70528708be9440aca66038a291f29eYassir Elley * You may not use this file except in compliance with the License.
19d3aba12c70528708be9440aca66038a291f29eYassir Elley * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19d3aba12c70528708be9440aca66038a291f29eYassir Elley * See the License for the specific language governing permissions
19d3aba12c70528708be9440aca66038a291f29eYassir Elley * and limitations under the License.
19d3aba12c70528708be9440aca66038a291f29eYassir Elley * When distributing Covered Code, include this CDDL HEADER in each
19d3aba12c70528708be9440aca66038a291f29eYassir Elley * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19d3aba12c70528708be9440aca66038a291f29eYassir Elley * If applicable, add the following below this CDDL HEADER, with the
19d3aba12c70528708be9440aca66038a291f29eYassir Elley * fields enclosed by brackets "[]" replaced with your own identifying
19d3aba12c70528708be9440aca66038a291f29eYassir Elley * information: Portions Copyright [yyyy] [name of copyright owner]
19d3aba12c70528708be9440aca66038a291f29eYassir Elley * CDDL HEADER END
19d3aba12c70528708be9440aca66038a291f29eYassir Elley * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
19d3aba12c70528708be9440aca66038a291f29eYassir Elley * Use is subject to license terms.
19d3aba12c70528708be9440aca66038a291f29eYassir Elley/* Copyright (c) 1988 AT&T */
19d3aba12c70528708be9440aca66038a291f29eYassir Elley/* All Rights Reserved */
b47449d8596d9573ff13e74b6984d080b414715aYassir Elley#pragma ident "%Z%%M% %I% %E% SMI"
19d3aba12c70528708be9440aca66038a291f29eYassir Elley#if !defined(_KMDB) && !defined(_BOOT) && !defined(_KERNEL)
19d3aba12c70528708be9440aca66038a291f29eYassir Elley#endif /* !_KMDB && !_BOOT && !_KERNEL */
19d3aba12c70528708be9440aca66038a291f29eYassir Elley * Set an array of n chars starting at sp to the character c.
19d3aba12c70528708be9440aca66038a291f29eYassir Elley * Return sp.
19d3aba12c70528708be9440aca66038a291f29eYassir Elley if (n != 0) {
b47449d8596d9573ff13e74b6984d080b414715aYassir Elley *sp++ = (unsigned char)c;
19d3aba12c70528708be9440aca66038a291f29eYassir Elley } while (--n != 0);