[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] replaced boolean char with int



commit ce04d2a6220c00497a60d38b3a96385226d94866
Author: Cristian Toader <cristian.matei.toader@xxxxxxxxx>
Date:   Thu Aug 29 15:19:49 2013 +0300

    replaced boolean char with int
---
 src/common/sandbox.c |   12 ++++++------
 src/common/sandbox.h |   10 +++++-----
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/common/sandbox.c b/src/common/sandbox.c
index 39f6932..0bfbd01 100644
--- a/src/common/sandbox.c
+++ b/src/common/sandbox.c
@@ -712,7 +712,7 @@ prot_strdup(char* str)
 
 #ifdef __NR_stat64
 int
-sandbox_cfg_allow_stat64_filename(sandbox_cfg_t **cfg, char *file, char fr)
+sandbox_cfg_allow_stat64_filename(sandbox_cfg_t **cfg, char *file, int fr)
 {
   sandbox_cfg_t *elem = NULL;
 
@@ -740,7 +740,7 @@ sandbox_cfg_allow_stat64_filename_array(sandbox_cfg_t **cfg, int num, ...)
 
   for (i = 0; i < num; i++) {
     char *fn = va_arg(ap, char*);
-    char fr = (char) va_arg(ap, int);
+    int fr = va_arg(ap, int);
 
     rc = sandbox_cfg_allow_stat64_filename(cfg, fn, fr);
     if (rc) {
@@ -756,7 +756,7 @@ sandbox_cfg_allow_stat64_filename_array(sandbox_cfg_t **cfg, int num, ...)
 #endif
 
 int
-sandbox_cfg_allow_open_filename(sandbox_cfg_t **cfg, char *file, char fr)
+sandbox_cfg_allow_open_filename(sandbox_cfg_t **cfg, char *file, int fr)
 {
   sandbox_cfg_t *elem = NULL;
 
@@ -784,7 +784,7 @@ sandbox_cfg_allow_open_filename_array(sandbox_cfg_t **cfg, int num, ...)
 
   for (i = 0; i < num; i++) {
     char *fn = va_arg(ap, char*);
-    char fr = (char) va_arg(ap, int);
+    int fr = va_arg(ap, int);
 
     rc = sandbox_cfg_allow_open_filename(cfg, fn, fr);
     if (rc) {
@@ -799,7 +799,7 @@ sandbox_cfg_allow_open_filename_array(sandbox_cfg_t **cfg, int num, ...)
 }
 
 int
-sandbox_cfg_allow_openat_filename(sandbox_cfg_t **cfg, char *file, char fr)
+sandbox_cfg_allow_openat_filename(sandbox_cfg_t **cfg, char *file, int fr)
 {
   sandbox_cfg_t *elem = NULL;
 
@@ -827,7 +827,7 @@ sandbox_cfg_allow_openat_filename_array(sandbox_cfg_t **cfg, int num, ...)
 
   for (i = 0; i < num; i++) {
     char *fn = va_arg(ap, char*);
-    char fr = (char) va_arg(ap, int);
+    int fr = va_arg(ap, int);
 
     rc = sandbox_cfg_allow_openat_filename(cfg, fn, fr);
     if (rc) {
diff --git a/src/common/sandbox.h b/src/common/sandbox.h
index 605df7f..4119d92 100644
--- a/src/common/sandbox.h
+++ b/src/common/sandbox.h
@@ -50,12 +50,12 @@ struct pfd_elem {
   int syscall;
 
   /** parameter index. */
-  char pindex;
+  int pindex;
   /** parameter value. */
   intptr_t param;
 
   /**  parameter flag (0 = not protected, 1 = protected). */
-  char prot;
+  int prot;
 
   struct pfd_elem *next;
 };
@@ -114,7 +114,7 @@ sandbox_cfg_t * sandbox_cfg_new(void);
  * need to be free-ed.
  */
 int sandbox_cfg_allow_open_filename(sandbox_cfg_t **cfg, char *file,
-    char fr);
+    int fr);
 
 /** Function used to add a series of open allowed filenames to a supplied
  * configuration.
@@ -134,7 +134,7 @@ int sandbox_cfg_allow_open_filename_array(sandbox_cfg_t **cfg, int num, ...);
  * need to be free-ed.
  */
 int sandbox_cfg_allow_openat_filename(sandbox_cfg_t **cfg, char *file,
-    char fr);
+    int fr);
 
 /** Function used to add a series of openat allowed filenames to a supplied
  * configuration.
@@ -173,7 +173,7 @@ int sandbox_cfg_allow_execve_array(sandbox_cfg_t **cfg, int num, ...);
  * need to be free-ed.
  */
 int sandbox_cfg_allow_stat64_filename(sandbox_cfg_t **cfg, char *file,
-    char fr);
+    int fr);
 
 /** Function used to add a series of stat64 allowed filenames to a supplied
  * configuration.



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits