=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/sudo/Attic/alloc.c,v retrieving revision 1.3 retrieving revision 1.4 diff -c -r1.3 -r1.4 *** src/usr.bin/sudo/Attic/alloc.c 2002/01/03 03:49:16 1.3 --- src/usr.bin/sudo/Attic/alloc.c 2002/01/14 00:11:44 1.4 *************** *** 1,5 **** /* ! * Copyright (c) 1999-2001 Todd C. Miller * All rights reserved. * * Redistribution and use in source and binary forms, with or without --- 1,5 ---- /* ! * Copyright (c) 1999-2002 Todd C. Miller * All rights reserved. * * Redistribution and use in source and binary forms, with or without *************** *** 58,75 **** #include "sudo.h" - #ifndef STDC_HEADERS - #if !defined(__GNUC__) && !defined(HAVE_MALLOC_H) - extern VOID *malloc __P((size_t)); - #endif /* !__GNUC__ && !HAVE_MALLOC_H */ - #endif /* !STDC_HEADERS */ - - extern char **Argv; /* from sudo.c */ - #ifndef lint ! static const char rcsid[] = "$Sudo: alloc.c,v 1.10 2001/12/14 19:52:47 millert Exp $"; #endif /* lint */ /* * emalloc() calls the system malloc(3) and exits with an error if --- 58,68 ---- #include "sudo.h" #ifndef lint ! static const char rcsid[] = "$Sudo: alloc.c,v 1.11 2002/01/09 16:56:04 millert Exp $"; #endif /* lint */ + extern char **Argv; /* from sudo.c */ /* * emalloc() calls the system malloc(3) and exits with an error if *************** *** 81,87 **** { VOID *ptr; ! if ((ptr = malloc(size)) == NULL) { (void) fprintf(stderr, "%s: cannot allocate memory!\n", Argv[0]); exit(1); } --- 74,80 ---- { VOID *ptr; ! if ((ptr = (VOID *) malloc(size)) == NULL) { (void) fprintf(stderr, "%s: cannot allocate memory!\n", Argv[0]); exit(1); } *************** *** 99,105 **** size_t size; { ! if ((ptr = ptr ? realloc(ptr, size) : malloc(size)) == NULL) { (void) fprintf(stderr, "%s: cannot allocate memory!\n", Argv[0]); exit(1); } --- 92,99 ---- size_t size; { ! ptr = ptr ? (VOID *) realloc(ptr, size) : (VOID *) malloc(size); ! if (ptr == NULL) { (void) fprintf(stderr, "%s: cannot allocate memory!\n", Argv[0]); exit(1); }