mirror of
https://github.com/sheumann/hush.git
synced 2024-12-26 10:32:02 +00:00
Shaun Jackman submitted a patch converting an allocation to use
CONFIG_RESERVE_BUFFER. (Rob Landley removed an #ifdef, per discussion on the list.)
This commit is contained in:
parent
47bc802e9e
commit
f7662da2af
@ -136,7 +136,6 @@ int date_main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
char *date_str = NULL;
|
char *date_str = NULL;
|
||||||
char *date_fmt = NULL;
|
char *date_fmt = NULL;
|
||||||
char *t_buff;
|
|
||||||
int set_time;
|
int set_time;
|
||||||
int utc;
|
int utc;
|
||||||
int use_arg = 0;
|
int use_arg = 0;
|
||||||
@ -283,10 +282,13 @@ int date_main(int argc, char **argv)
|
|||||||
date_fmt = "%Y.%m.%d-%H:%M:%S";
|
date_fmt = "%Y.%m.%d-%H:%M:%S";
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Print OUTPUT (after ALL that!) */
|
{
|
||||||
t_buff = xmalloc(201);
|
/* Print OUTPUT (after ALL that!) */
|
||||||
strftime(t_buff, 200, date_fmt, &tm_time);
|
RESERVE_CONFIG_BUFFER(t_buff, 201);
|
||||||
puts(t_buff);
|
strftime(t_buff, 200, date_fmt, &tm_time);
|
||||||
|
puts(t_buff);
|
||||||
|
RELEASE_CONFIG_BUFFER(t_buff);
|
||||||
|
}
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user