On Thu, 2014-04-24 at 16:06 +0200, chru...@suse.cz wrote: > Hi! > > +int safe_getresuid(const char *file, const int lineno, void > > (*cleanup_fn)(void), > > + uid_t *ruid, uid_t *euid, uid_t *suid) > > +{ > > + int rval; > > + > > + rval = getresuid(ruid, euid, suid); > > + if (rval == -1) { > > + tst_brkm(TBROK | TERRNO, cleanup_fn, > > + "%s:%d: getresuid(%u, %u, %u) failed", > > + file, lineno, (unsigned) *ruid, (unsigned) *euid, > > + (unsigned) *suid); > > Hmm, will there be any usable information ruid, euid and suid when > getresuid failed? My guess is that the values would be filled with > garbage. You should print the pointers passed to the call with %p > instead. >
Thanks for your review. I will print the information with %p. Best regards, Zeng ------------------------------------------------------------------------------ Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A Collaboration Platform http://p.sf.net/sfu/ExoPlatform _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list