Usage -1 as argument count in syscallent tables necessitates the check for it, a-la:
if (tcp->scno >= 0 && tcp->scno < nsyscalls && sysent[tcp->scno].nargs != -1) tcp->u_nargs = sysent[tcp->scno].nargs; else tcp->u_nargs = MAX_ARGS; which is stupid: we waste cycles checking something which is constant and known at compile time. I propose to fix it with these changes: * Replace all -1 by MA in all tables. * Redefine struct sysent::nargs as unsigned (sadly, this is mostly cosmetic, as gcc won't warn about -1 static initializer for unsigned field, but still...) * Add #define MA MAX_ARGS / #undef MA around #include "syscallent[N].h" * Remove sysent[tcp->scno].nargs != -1 checks. This seems a good plan to me, so I'm going to commit these changes, but nevertheless feel free to point out any deficiencies in this plan I might have missed... -- vda ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 _______________________________________________ Strace-devel mailing list Strace-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/strace-devel