]> granicus.if.org Git - strace/commitdiff
Change type of {s,t}print_open_modes's argument to unsigned
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 28 Apr 2016 23:40:37 +0000 (23:40 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 29 Apr 2016 00:13:20 +0000 (00:13 +0000)
As "flags" argument of sprint_open_modes and tprint_open_modes is
involved only in bit operations, change its type to unsigned.

* defs.h.c (sprint_open_modes, tprint_open_modes): Change type
to unsigned int.
* open.c (sprint_open_modes, tprint_open_modes): Likewise.

defs.h
open.c

diff --git a/defs.h b/defs.h
index eec0228bb50020ec1a229ba8e676e3d8c2d9aa03..d1e8e1bfd4a1a313c8ad3e6987713d3a84d29a16 100644 (file)
--- a/defs.h
+++ b/defs.h
@@ -629,8 +629,8 @@ extern const char *sprintsigmask_n(const char *, const void *, unsigned int);
 extern void printsignal(int);
 extern void tprint_iov(struct tcb *, unsigned long, unsigned long, int decode_iov);
 extern void tprint_iov_upto(struct tcb *, unsigned long, unsigned long, int decode_iov, unsigned long);
-extern void tprint_open_modes(int);
-extern const char *sprint_open_modes(int);
+extern void tprint_open_modes(unsigned int);
+extern const char *sprint_open_modes(unsigned int);
 extern void print_seccomp_filter(struct tcb *tcp, unsigned long);
 
 struct strace_statfs;
diff --git a/open.c b/open.c
index 9bd1b95aaea81a5c702ec9ceeadd6d421bf566cd..90dd10fe2d8f08ebb81c8f7a404c62e289b319fc 100644 (file)
--- a/open.c
+++ b/open.c
@@ -73,7 +73,7 @@ print_dirfd(struct tcb *tcp, int fd)
  * other bits are real flags.
  */
 const char *
-sprint_open_modes(int flags)
+sprint_open_modes(unsigned int flags)
 {
        static char outstr[(1 + ARRAY_SIZE(open_mode_flags)) * sizeof("O_LARGEFILE")];
        char *p;
@@ -110,7 +110,7 @@ sprint_open_modes(int flags)
 }
 
 void
-tprint_open_modes(int flags)
+tprint_open_modes(unsigned int flags)
 {
        tprints(sprint_open_modes(flags) + sizeof("flags"));
 }