aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-08-24 13:32:39 -0400
committerNick Mathewson <nickm@torproject.org>2014-08-24 13:32:39 -0400
commit991545acf19039b2d8ca895bdcf53bb5f2770c31 (patch)
tree614e3a366cd23d0d373bcca868e1ff80053f0b28
parent7c1143e11f531c3ff1126bdffdd69efd9121fa09 (diff)
downloadtor-991545acf19039b2d8ca895bdcf53bb5f2770c31.tar.gz
tor-991545acf19039b2d8ca895bdcf53bb5f2770c31.zip
Whitespace fixes
-rw-r--r--src/common/sandbox.c90
-rw-r--r--src/common/torgzip.c1
-rw-r--r--src/or/circuitlist.c1
3 files changed, 2 insertions, 90 deletions
diff --git a/src/common/sandbox.c b/src/common/sandbox.c
index e735feb018..e215fe2926 100644
--- a/src/common/sandbox.c
+++ b/src/common/sandbox.c
@@ -99,7 +99,7 @@ static sandbox_cfg_t *filter_dynamic = NULL;
#undef SCMP_CMP
#define SCMP_CMP(a,b,c) ((struct scmp_arg_cmp){(a),(b),(c),0})
#define SCMP_CMP_STR(a,b,c) \
- ((struct scmp_arg_cmp){(a),(b),(intptr_t)(void*)(c),0})
+ ((struct scmp_arg_cmp) {(a),(b),(intptr_t)(void*)(c),0})
#define SCMP_CMP4(a,b,c,d) ((struct scmp_arg_cmp){(a),(b),(c),(d)})
/* We use a wrapper here because these masked comparisons seem to be pretty
* verbose. Also, it's important to cast to scmp_datum_t before negating the
@@ -1173,28 +1173,6 @@ sandbox_cfg_allow_stat_filename(sandbox_cfg_t **cfg, char *file)
}
int
-sandbox_cfg_allow_stat_filename_array(sandbox_cfg_t **cfg, ...)
-{
- int rc = 0;
- char *fn = NULL;
-
- va_list ap;
- va_start(ap, cfg);
-
- while ((fn = va_arg(ap, char*)) != NULL) {
- rc = sandbox_cfg_allow_stat_filename(cfg, fn);
- if (rc) {
- log_err(LD_BUG,"(Sandbox) sandbox_cfg_allow_stat_filename_array fail");
- goto end;
- }
- }
-
- end:
- va_end(ap);
- return 0;
-}
-
-int
sandbox_cfg_allow_open_filename(sandbox_cfg_t **cfg, char *file)
{
sandbox_cfg_t *elem = NULL;
@@ -1230,28 +1208,6 @@ sandbox_cfg_allow_rename(sandbox_cfg_t **cfg, char *file1, char *file2)
}
int
-sandbox_cfg_allow_open_filename_array(sandbox_cfg_t **cfg, ...)
-{
- int rc = 0;
- char *fn = NULL;
-
- va_list ap;
- va_start(ap, cfg);
-
- while ((fn = va_arg(ap, char*)) != NULL) {
- rc = sandbox_cfg_allow_open_filename(cfg, fn);
- if (rc) {
- log_err(LD_BUG,"(Sandbox) sandbox_cfg_allow_open_filename_array fail");
- goto end;
- }
- }
-
- end:
- va_end(ap);
- return 0;
-}
-
-int
sandbox_cfg_allow_openat_filename(sandbox_cfg_t **cfg, char *file)
{
sandbox_cfg_t *elem = NULL;
@@ -1268,28 +1224,6 @@ sandbox_cfg_allow_openat_filename(sandbox_cfg_t **cfg, char *file)
return 0;
}
-int
-sandbox_cfg_allow_openat_filename_array(sandbox_cfg_t **cfg, ...)
-{
- int rc = 0;
- char *fn = NULL;
-
- va_list ap;
- va_start(ap, cfg);
-
- while ((fn = va_arg(ap, char*)) != NULL) {
- rc = sandbox_cfg_allow_openat_filename(cfg, fn);
- if (rc) {
- log_err(LD_BUG,"(Sandbox) sandbox_cfg_allow_openat_filename_array fail");
- goto end;
- }
- }
-
- end:
- va_end(ap);
- return 0;
-}
-
#if 0
int
sandbox_cfg_allow_execve(sandbox_cfg_t **cfg, const char *com)
@@ -1308,28 +1242,6 @@ sandbox_cfg_allow_execve(sandbox_cfg_t **cfg, const char *com)
return 0;
}
-int
-sandbox_cfg_allow_execve_array(sandbox_cfg_t **cfg, ...)
-{
- int rc = 0;
- char *fn = NULL;
-
- va_list ap;
- va_start(ap, cfg);
-
- while ((fn = va_arg(ap, char*)) != NULL) {
-
- rc = sandbox_cfg_allow_execve(cfg, fn);
- if (rc) {
- log_err(LD_BUG,"(Sandbox) sandbox_cfg_allow_execve_array failed");
- goto end;
- }
- }
-
- end:
- va_end(ap);
- return 0;
-}
#endif
/** Cache entry for getaddrinfo results; used when sandboxing is implemented
diff --git a/src/common/torgzip.c b/src/common/torgzip.c
index 26ce2183ed..b4688bf9d8 100644
--- a/src/common/torgzip.c
+++ b/src/common/torgzip.c
@@ -586,3 +586,4 @@ tor_zlib_get_total_allocation(void)
{
return total_zlib_allocation;
}
+
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c
index e04b4b9348..35c52362d2 100644
--- a/src/or/circuitlist.c
+++ b/src/or/circuitlist.c
@@ -2083,7 +2083,6 @@ circuits_handle_oom(size_t current_allocation)
circ->global_circuitlist_idx = circ_sl_idx;
} SMARTLIST_FOREACH_END(circ);
-
/* Now sort the connection array ... */
now_ms_for_buf_cmp = now_ms;
smartlist_sort(connection_array, conns_compare_by_buffer_age_);