aboutsummaryrefslogtreecommitdiffstats
path: root/g10/revoke.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>1999-04-07 18:58:34 +0000
committerWerner Koch <[email protected]>1999-04-07 18:58:34 +0000
commit9f40263e56cc9ebe28016bb4588da3846342ba79 (patch)
tree1ca711569d0878d441798bf4f185036eda8fceda /g10/revoke.c
parentSee ChangeLog: Tue Apr 6 19:58:12 CEST 1999 Werner Koch (diff)
downloadgnupg-9f40263e56cc9ebe28016bb4588da3846342ba79.tar.gz
gnupg-9f40263e56cc9ebe28016bb4588da3846342ba79.zip
See ChangeLog: Wed Apr 7 20:51:39 CEST 1999 Werner Koch
Diffstat (limited to 'g10/revoke.c')
0 files changed, 0 insertions, 0 deletions
any later version. * * or * * - the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at * your option) any later version. * * or both in parallel, as here. * * JNLIB is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copies of the GNU General Public License * and the GNU Lesser General Public License along with this program; * if not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdlib.h> #include <string.h> #include <stdio.h> #include "libjnlib-config.h" #include "xmalloc.h" static void out_of_core(void) { fputs("\nfatal: out of memory\n", stderr ); exit(2); } void * xmalloc( size_t n ) { void *p; /* Make sure that xmalloc (0) works. This is the same behaviour has in gpg 2.x. Note that in contrast to this code, Libgcrypt (and thus most xmallocs in gpg 2.x) detect the !n and bail out. */ if (!n) n = 1; p = malloc( n ); if( !p ) out_of_core(); return p; } void * xrealloc( void *a, size_t n ) { void *p = realloc( a, n ); if( !p ) out_of_core(); return p; } void * xcalloc( size_t n, size_t m ) { void *p; if (!n) n = 1; if (!m) m = 1; p = calloc( n, m );