This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Two small readelf.c fixes


> +	snprintf (name, REGNAMESZ, "??? 0x%x", regno);

Always use %#x rather than 0x%x.  But here you should not be doing this
way at all.  Just do:

      snprintf (name, REGNAMESZ, "reg%u", loc == NULL ? regno : loc->regno);

But, in fact, this looks like there was a latent bug already.  It should
not be using LOC->regno at all, but just always REGNO here.


Thanks,
Roland

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]