struct tm *tm = gmtime(&t);
if (!tm)
return -1;
- strftime(buf, buf_size, "%Y-%m-%d %H:%M:%S", tm);
+ if (!strftime(buf, buf_size, "%Y-%m-%d %H:%M:%S", tm))
+ return -1;
return 0;
}
struct tm *tm = gmtime(&t);
if (!tm)
return -1;
- strftime(buf, buf_size, "%Y-%m-%d %H:%M:%S", tm);
+ if (!strftime(buf, buf_size, "%Y-%m-%d %H:%M:%S", tm))
+ return -1;
return 0;
}
struct tm *tm= gmtime(&t);
if (!tm)
return -1;
- strftime(buf, buf_size, "%Y-%m-%d %H:%M:%S", tm);
+ if (!strftime(buf, buf_size, "%Y-%m-%d %H:%M:%S", tm))
+ return -1;
return 0;
}