xref: /netbsd-src/crypto/external/bsd/heimdal/dist/lib/krb5/enomem.c (revision afab4e300d3a9fb07dd8c80daf53d0feb3345706)
1*afab4e30Schristos /*	$NetBSD: enomem.c,v 1.3 2023/06/19 21:41:44 christos Exp $	*/
2b9d004c6Schristos 
3b9d004c6Schristos /*
4b9d004c6Schristos  * Copyright (c) 1997 Kungliga Tekniska Högskolan
5b9d004c6Schristos  * (Royal Institute of Technology, Stockholm, Sweden).
6b9d004c6Schristos  * All rights reserved.
7b9d004c6Schristos  *
8b9d004c6Schristos  * Redistribution and use in source and binary forms, with or without
9b9d004c6Schristos  * modification, are permitted provided that the following conditions
10b9d004c6Schristos  * are met:
11b9d004c6Schristos  *
12b9d004c6Schristos  * 1. Redistributions of source code must retain the above copyright
13b9d004c6Schristos  *    notice, this list of conditions and the following disclaimer.
14b9d004c6Schristos  *
15b9d004c6Schristos  * 2. Redistributions in binary form must reproduce the above copyright
16b9d004c6Schristos  *    notice, this list of conditions and the following disclaimer in the
17b9d004c6Schristos  *    documentation and/or other materials provided with the distribution.
18b9d004c6Schristos  *
19b9d004c6Schristos  * 3. Neither the name of the Institute nor the names of its contributors
20b9d004c6Schristos  *    may be used to endorse or promote products derived from this software
21b9d004c6Schristos  *    without specific prior written permission.
22b9d004c6Schristos  *
23b9d004c6Schristos  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
24b9d004c6Schristos  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25b9d004c6Schristos  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26b9d004c6Schristos  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
27b9d004c6Schristos  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28b9d004c6Schristos  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29b9d004c6Schristos  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30b9d004c6Schristos  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31b9d004c6Schristos  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32b9d004c6Schristos  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33b9d004c6Schristos  * SUCH DAMAGE.
34b9d004c6Schristos  */
35b9d004c6Schristos 
36b9d004c6Schristos #include "krb5_locl.h"
37b9d004c6Schristos 
38*afab4e30Schristos #undef krb5_enomem
39b9d004c6Schristos krb5_error_code
krb5_enomem(krb5_context context)40b9d004c6Schristos krb5_enomem(krb5_context context)
41b9d004c6Schristos {
42b9d004c6Schristos     krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", ""));
43b9d004c6Schristos     return ENOMEM;
44b9d004c6Schristos }
45