diff options
author | Michal Privoznik <mprivozn@redhat.com> | 2019-03-03 19:34:57 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2019-03-10 04:40:23 +0100 |
commit | fb48c25076e5cd918db44c5147901d0ec3cec323 (patch) | |
tree | 41ca2b368af52913585f1766d06dfe004ef34a72 /lib/alloca.c | |
parent | 363bf26b4102c295036666594a3e0a933674bccd (diff) | |
download | gnulib-fb48c25076e5cd918db44c5147901d0ec3cec323.tar.gz |
alloca, tsearch-tests: Write NULL for the null pointer.
* lib/alloca.c (i00afunc): Write NULL instead of 0.
* tests/test-tsearch.c (mangle_tree): Likewise.
Diffstat (limited to 'lib/alloca.c')
-rw-r--r-- | lib/alloca.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/alloca.c b/lib/alloca.c index ee0f018868..d0476d53e6 100644 --- a/lib/alloca.c +++ b/lib/alloca.c @@ -350,16 +350,16 @@ i00afunc (long *address) /* There must be at least one stack segment. Therefore it is a fatal error if "trailer" is null. */ - if (trailer == 0) + if (trailer == NULL) abort (); /* Discard segments that do not contain our argument address. */ - while (trailer != 0) + while (trailer != NULL) { block = (long *) trailer->this_address; size = trailer->this_size; - if (block == 0 || size == 0) + if (block == NULL || size == 0) abort (); trailer = (struct stk_trailer *) trailer->link; if ((block <= address) && (address < (block + size))) @@ -371,7 +371,7 @@ i00afunc (long *address) result = address - block; - if (trailer == 0) + if (trailer == NULL) { return result; } @@ -383,7 +383,7 @@ i00afunc (long *address) result += trailer->this_size; trailer = (struct stk_trailer *) trailer->link; } - while (trailer != 0); + while (trailer != NULL); /* We are done. Note that if you present a bogus address (one not in any segment), you will get a different number back, formed |