lib/time/day_to_str.h: DAY_TO_STR(): Add macro
This macro ensures that the buffer is an array, and calculates the size. Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
committed by
Serge Hallyn
parent
be05c62bd7
commit
19edb06fd2
@@ -12,9 +12,14 @@
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#include "defines.h"
|
||||
#include "sizeof.h"
|
||||
#include "string/strtcpy.h"
|
||||
|
||||
|
||||
#define DAY_TO_STR(str, day) date_to_str(NITEMS(str), str, day * DAY)
|
||||
|
||||
|
||||
inline void date_to_str(size_t size, char buf[size], long date);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user