logo
Published on KernelTrap (http://kerneltrap.org)

Errors in desciption of asctime

By
Created Nov 8 2007 - 02:11

At the website

http://kerneltrap.org/man/linux/man3p/asctime.3p [1]

there are following errors in the code:

static char wday_name[7][3] = {
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
};
static char mon_name[12][3] = {
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
};

The numbers [3] must be [4] since there is a '\0' character at the end.

Thomas


Source URL:
http://kerneltrap.org/node/14760