aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCristian Toader <cristian.matei.toader@gmail.com>2013-08-29 12:41:17 +0300
committerCristian Toader <cristian.matei.toader@gmail.com>2013-08-29 12:41:17 +0300
commit8e2b9d28442a6291f4de5d039d4035882b12845f (patch)
tree9b1c04fd56013c2c82fff901d3c9052ce6cd130f
parent6cae5d706c5802f28c46cece95b1cf8bd08f387a (diff)
downloadtor-8e2b9d28442a6291f4de5d039d4035882b12845f.tar
tor-8e2b9d28442a6291f4de5d039d4035882b12845f.tar.gz
small fixes in documentation and sandbox_getaddrinfo()
-rw-r--r--src/common/sandbox.c2
-rw-r--r--src/common/sandbox.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/common/sandbox.c b/src/common/sandbox.c
index 13d4ce927..39f6932e2 100644
--- a/src/common/sandbox.c
+++ b/src/common/sandbox.c
@@ -892,7 +892,7 @@ sandbox_getaddrinfo(const char *name, struct addrinfo **res)
}
*res = NULL;
*res = (struct addrinfo *)malloc(sizeof(struct addrinfo));
- if (!res) {
+ if (*res == NULL) {
return -2;
}
diff --git a/src/common/sandbox.h b/src/common/sandbox.h
index d7e117286..605df7f34 100644
--- a/src/common/sandbox.h
+++ b/src/common/sandbox.h
@@ -68,10 +68,10 @@ typedef int (*sandbox_filter_func_t)(scmp_filter_ctx ctx,
/** Type that will be used in step 3 in order to manage multiple sandboxes.*/
typedef struct {
- // function pointers associated with the filter
+ /** function pointers associated with the filter */
sandbox_filter_func_t *filter_func;
- // filter function pointer parameters
+ /** filter function pointer parameters */
sandbox_cfg_t *filter_dynamic;
} sandbox_t;