In the human_readable case; otherwise the strcat() that follows may append bytes to the previous contents of buf. Also, slightly enlarge buf, as it was a bit too tight. Could also replace all sprintf()s with snprintf()s, but all the calls here output a limited number of characters, so they should be safe. ---------------------------- adapted for newlib branch . the source file is now proc/uptime.c . function is now named 'procps_uptime_sprint()' . new human readable function 'procps_uptime_sprint_short()' . both were already initialized, so just raised size of 2 buffers Signed-off-by: Jim Warner <james.warner@comcast.net>
5.8 KiB
5.8 KiB