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 int count_syscall(struct tcb *, struct timeval *);
|
||||||
extern void printxval(const struct xlat *, int, const char *);
|
extern void printxval(const struct xlat *, int, const char *);
|
||||||
extern int printargs(struct tcb *);
|
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 int printflags(const struct xlat *, int, const char *);
|
||||||
extern const char *sprintflags(const char *, const struct xlat *, int);
|
extern const char *sprintflags(const char *, const struct xlat *, int);
|
||||||
extern int umoven(struct tcb *, long, int, char *);
|
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'
|
* print the entries whose bits are on in `flags'
|
||||||
* return # of flags printed.
|
* return # of flags printed.
|
||||||
*/
|
*/
|
||||||
int
|
void
|
||||||
addflags(const struct xlat *xlat, int flags)
|
addflags(const struct xlat *xlat, int flags)
|
||||||
{
|
{
|
||||||
int n;
|
for (; xlat->str; xlat++) {
|
||||||
|
|
||||||
for (n = 0; xlat->str; xlat++) {
|
|
||||||
if (xlat->val && (flags & xlat->val) == xlat->val) {
|
if (xlat->val && (flags & xlat->val) == xlat->val) {
|
||||||
tprintf("|%s", xlat->str);
|
tprintf("|%s", xlat->str);
|
||||||
flags &= ~xlat->val;
|
flags &= ~xlat->val;
|
||||||
n++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (flags) {
|
if (flags) {
|
||||||
tprintf("|%#x", 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'
|
* Print to static string the entries whose bits are on in `flags'
|
||||||
* Return static string.
|
* Return static string.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user