diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-01 18:22:39 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-01 18:22:39 +0000 |
commit | ea96823f2626e2a4178eec54f8a78a666d376ac1 (patch) | |
tree | d6fd63606de3355d2e0f7bb2ab751116095a1451 /main/db1-ast | |
parent | 1c4fdfd503883d806ba05da5d0e9156b54a4d51b (diff) |
fix a bunch of potential problems found by gcc 4.3.x, primarily bare strings being passed to printf()-like functions and ignored results from read()/write() and friends
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@153337 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/db1-ast')
-rw-r--r-- | main/db1-ast/hash/hash_page.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/main/db1-ast/hash/hash_page.c b/main/db1-ast/hash/hash_page.c index 737b97d32..52571c552 100644 --- a/main/db1-ast/hash/hash_page.c +++ b/main/db1-ast/hash/hash_page.c @@ -712,7 +712,8 @@ overflow_page(hashp) #define OVMSG "HASH: Out of overflow pages. Increase page size\n" if (offset > SPLITMASK) { if (++splitnum >= NCACHED) { - (void)write(STDERR_FILENO, OVMSG, sizeof(OVMSG) - 1); + if (write(STDERR_FILENO, OVMSG, sizeof(OVMSG) - 1) < 0) { + } return (0); } hashp->OVFL_POINT = splitnum; @@ -725,7 +726,8 @@ overflow_page(hashp) if (free_bit == (hashp->BSIZE << BYTE_SHIFT) - 1) { free_page++; if (free_page >= NCACHED) { - (void)write(STDERR_FILENO, OVMSG, sizeof(OVMSG) - 1); + if (write(STDERR_FILENO, OVMSG, sizeof(OVMSG) - 1) < 0) { + } return (0); } /* @@ -749,8 +751,8 @@ overflow_page(hashp) offset++; if (offset > SPLITMASK) { if (++splitnum >= NCACHED) { - (void)write(STDERR_FILENO, OVMSG, - sizeof(OVMSG) - 1); + if (write(STDERR_FILENO, OVMSG, sizeof(OVMSG) - 1) < 0) { + } return (0); } hashp->OVFL_POINT = splitnum; |