165393a86SMarcel Moolenaar /*-
2*4d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause
3d915a14eSPedro F. Giffuni *
465393a86SMarcel Moolenaar * Copyright (c) 2002 Marcel Moolenaar
565393a86SMarcel Moolenaar * Copyright (c) 2002 Hiten Mahesh Pandya
665393a86SMarcel Moolenaar * All rights reserved.
765393a86SMarcel Moolenaar *
865393a86SMarcel Moolenaar * Redistribution and use in source and binary forms, with or without
965393a86SMarcel Moolenaar * modification, are permitted provided that the following conditions
1065393a86SMarcel Moolenaar * are met:
1165393a86SMarcel Moolenaar * 1. Redistributions of source code must retain the above copyright
1265393a86SMarcel Moolenaar * notice, this list of conditions and the following disclaimer.
1365393a86SMarcel Moolenaar * 2. Redistributions in binary form must reproduce the above copyright
1465393a86SMarcel Moolenaar * notice, this list of conditions and the following disclaimer in the
1565393a86SMarcel Moolenaar * documentation and/or other materials provided with the distribution.
1665393a86SMarcel Moolenaar *
1765393a86SMarcel Moolenaar * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1865393a86SMarcel Moolenaar * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1965393a86SMarcel Moolenaar * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2065393a86SMarcel Moolenaar * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2165393a86SMarcel Moolenaar * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2265393a86SMarcel Moolenaar * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2365393a86SMarcel Moolenaar * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2465393a86SMarcel Moolenaar * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2565393a86SMarcel Moolenaar * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2665393a86SMarcel Moolenaar * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2765393a86SMarcel Moolenaar * SUCH DAMAGE.
2865393a86SMarcel Moolenaar */
2965393a86SMarcel Moolenaar
3065393a86SMarcel Moolenaar #include <strings.h>
3165393a86SMarcel Moolenaar #include <uuid.h>
3265393a86SMarcel Moolenaar
3365393a86SMarcel Moolenaar /*
3465393a86SMarcel Moolenaar * uuid_create_nil() - create a nil UUID.
3565393a86SMarcel Moolenaar * See also:
3665393a86SMarcel Moolenaar * http://www.opengroup.org/onlinepubs/009629399/uuid_create_nil.htm
3765393a86SMarcel Moolenaar */
3865393a86SMarcel Moolenaar void
uuid_create_nil(uuid_t * u,uint32_t * status)3965393a86SMarcel Moolenaar uuid_create_nil(uuid_t *u, uint32_t *status)
4065393a86SMarcel Moolenaar {
4165393a86SMarcel Moolenaar
4265393a86SMarcel Moolenaar if (status)
4365393a86SMarcel Moolenaar *status = uuid_s_ok;
4465393a86SMarcel Moolenaar
4565393a86SMarcel Moolenaar bzero(u, sizeof(*u));
4665393a86SMarcel Moolenaar }
47