Make addflags return void
* defs.h (addflags): Change return type from int to void. * util.c (addflags): Change return type from int to void. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
This commit is contained in:
parent
d9560c1080
commit
4924dbd6d7
2
defs.h
2
defs.h
@ -572,7 +572,7 @@ extern int trace_syscall(struct tcb *);
|
||||
extern int count_syscall(struct tcb *, struct timeval *);
|
||||
extern void printxval(const struct xlat *, int, const char *);
|
||||
extern int printargs(struct tcb *);
|
||||
extern int addflags(const struct xlat *, int);
|
||||
extern void addflags(const struct xlat *, int);
|
||||
extern int printflags(const struct xlat *, int, const char *);
|
||||
extern const char *sprintflags(const char *, const struct xlat *, int);
|
||||
extern int umoven(struct tcb *, long, int, char *);
|
||||
|
11
util.c
11
util.c
@ -279,27 +279,22 @@ printllval(struct tcb *tcp, const char *format, int llarg)
|
||||
* print the entries whose bits are on in `flags'
|
||||
* return # of flags printed.
|
||||
*/
|
||||
int
|
||||
void
|
||||
addflags(const struct xlat *xlat, int flags)
|
||||
{
|
||||
int n;
|
||||
|
||||
for (n = 0; xlat->str; xlat++) {
|
||||
for (; xlat->str; xlat++) {
|
||||
if (xlat->val && (flags & xlat->val) == xlat->val) {
|
||||
tprintf("|%s", xlat->str);
|
||||
flags &= ~xlat->val;
|
||||
n++;
|
||||
}
|
||||
}
|
||||
if (flags) {
|
||||
tprintf("|%#x", flags);
|
||||
n++;
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
/*
|
||||
* Interpret `xlat' as an array of flags/
|
||||
* Interpret `xlat' as an array of flags.
|
||||
* Print to static string the entries whose bits are on in `flags'
|
||||
* Return static string.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user