Signed-off-by: Jim Meyering <[email protected]>
---
Just noticed that sometimes tabled uses this idiom:
if (!(key = malloc(klen + 1)))
and sometimes this:
if ((key = malloc(klen + 1)) == NULL)
This time I used "... == NULL".
server/server.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/server/server.c b/server/server.c
index 2b4ef1c..3cec5ae 100644
--- a/server/server.c
+++ b/server/server.c
@@ -306,7 +306,8 @@ static char *pathtokey(const char *path)
return NULL;
klen = end - path;
- key = malloc(klen + 1);
+ if ((key = malloc(klen + 1)) == NULL)
+ return NULL;
memcpy(key, path, klen);
key[klen] = 0;
--
1.7.3.234.g7bba3
--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html