11.1Snia/* $OpenBSD: xmalloc.h,v 1.4 2015/11/12 16:30:30 mmcc Exp $ */
21.1Snia
31.1Snia/*
41.1Snia * Author: Tatu Ylonen <ylo@cs.hut.fi>
51.1Snia * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
61.1Snia *                    All rights reserved
71.1Snia * Created: Mon Mar 20 22:09:17 1995 ylo
81.1Snia *
91.1Snia * Versions of malloc and friends that check their results, and never return
101.1Snia * failure (they call fatal if they encounter an error).
111.1Snia *
121.1Snia * As far as I am concerned, the code I have written for this software
131.1Snia * can be used freely for any purpose.  Any derived versions of this
141.1Snia * software must be clearly marked as such, and if the derived work is
151.1Snia * incompatible with the protocol description in the RFC file, it must be
161.1Snia * called by a name other than "ssh" or "Secure Shell".
171.1Snia */
181.1Snia
191.1Snia#ifndef XMALLOC_H
201.1Snia#define XMALLOC_H
211.1Snia
221.1Sniavoid	*xmalloc(size_t);
231.1Sniavoid	*xcalloc(size_t, size_t);
241.1Sniavoid	*xreallocarray(void *, size_t, size_t);
251.1Sniachar	*xstrdup(const char *);
261.1Sniaint	 xasprintf(char **, const char *, ...)
271.1Snia                __attribute__((__format__ (printf, 2, 3)))
281.1Snia                __attribute__((__nonnull__ (2)));
291.1Snia
301.1Snia#endif	/* XMALLOC_H */
31