commit | b0fd55608e707b3e9b5c2937537414be7d098afd | [log] [tgz] |
---|---|---|
author | Dan Albert <danalbert@google.com> | Tue Oct 07 11:07:53 2014 -0700 |
committer | Dan Albert <danalbert@google.com> | Tue Oct 07 11:28:47 2014 -0700 |
tree | e05263210015392be20269fbeec18b31ec780206 | |
parent | 81fca35672df90e2f770e67bbf7e7735c6ff8bd8 [diff] |
Use snprintf instead of sprintf. At -O0, the attribute warning on sprintf is actually triggered (why doesn't this happen with -Os?!) and promoted to an error by -Werror. asctime64_r() is a non-standard function, but the IBM docs state that the buffer is assumed to be at least 26 characters wide, and the format string does limit to that (assuming a 4 digit year, also defined by the IBM docs). http://www-01.ibm.com/support/knowledgecenter/SSLTBW_2.1.0/com.ibm.zos.v2r1.bpxbd00/asctimer.htm Change-Id: I1c884474a769aa16c53e985c3d8d694c478c1189