diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2004-04-13 03:24:45 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2004-04-13 03:24:45 +0000 |
commit | cce5a349d925f51344f3fc63d44ce852afd3d1d1 (patch) | |
tree | e1b367a72516e99b2ef83f79afe867e4d977fe00 /utils/Spiff/misc.c | |
parent | 401be2c18c104cd25b9889143859580c4b7c78b7 (diff) | |
download | external_llvm-cce5a349d925f51344f3fc63d44ce852afd3d1d1.zip external_llvm-cce5a349d925f51344f3fc63d44ce852afd3d1d1.tar.gz external_llvm-cce5a349d925f51344f3fc63d44ce852afd3d1d1.tar.bz2 |
Clean up the Spiff code so that it emits fewer warnings. This
consists mostly of changing sloppy K&R C code to slightly more
disciplined K&R C code, and doing the usual things to shut gcc up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12877 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/Spiff/misc.c')
-rw-r--r-- | utils/Spiff/misc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/Spiff/misc.c b/utils/Spiff/misc.c index 3bdf164..3c77673 100644 --- a/utils/Spiff/misc.c +++ b/utils/Spiff/misc.c @@ -15,6 +15,7 @@ static char rcsid[]= "$Header$"; #include "misc.h" #include "visual.h" #include "output.h" +#include <stdlib.h> /* ** various routines used throughout the program @@ -101,7 +102,7 @@ _Z_myalloc(k) int k; { int *tmp; - if (tmp = (int*) calloc((unsigned)k,(unsigned)1)) + if ((tmp = (int*) calloc((unsigned)k,(unsigned)1))) { return(tmp); } |