Skip to content

Fix nonportable printf format

Ken, Kurematsu requested to merge k.kurematsu/procps:fix_printf_Ld into oldlib

%L is a glibc extension, so fix it to standard %ll. Because it didn't work properly with libraries other than glibc. Hertz is unsigned so modified to %llu.

from: man 3 printf

   As a nonstandard extension, the GNU implementations treats ll and L as synonyms, so that one can, for example, write llg (as a synonym  for  the  standards-
   compliant Lg) and Ld (as a synonym for the standards compliant lld).  Such usage is nonportable.

See: #238 (closed)

Signed-off-by: Ken Kurematsu k.kurematsu@nskint.co.jp

Merge request reports