Skip to content
Snippets Groups Projects
Commit 664441ea authored by Filip Bozuta's avatar Filip Bozuta Committed by Laurent Vivier
Browse files

linux-user: Fix "print_fdset()" in "strace.c" to not print ", " after last value


Function "print_fdset()" in "strace.c" is used to print the file descriptor
values in "print__newselect()" which prints arguments of syscall _newselect().
Until changes from this patch, this function was printing "," even after the
last value of the fd_set argument. This was changed in this patch by removing
this unnecessary "," after the last fd value and thus improving the estetics of
the _newselect() "-strace" print.

Implementation notes:

   The printing fix was made possible by using an existing function "get_comma()"
   which returns a "," or an empty string "" based on its argument (0 for "," and
   other for "").

Signed-off-by: default avatarFilip Bozuta <Filip.Bozuta@syrmia.com>
Reviewed-by: default avatarLaurent Vivier <laurent@vivier.eu>
Message-Id: <20200702160915.9517-1-Filip.Bozuta@syrmia.com>
Signed-off-by: default avatarLaurent Vivier <laurent@vivier.eu>
parent d7df0cee
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment