| 34 |
|
#include "fdlist.h" |
| 35 |
|
#include "hash.h" |
| 36 |
|
#include "irc_string.h" |
| 37 |
– |
#include "sprintf_irc.h" |
| 37 |
|
#include "ircd_signal.h" |
| 38 |
|
#include "s_gline.h" |
| 39 |
|
#include "motd.h" |
| 194 |
|
|
| 195 |
|
if (newtime.tv_sec < CurrentTime) |
| 196 |
|
{ |
| 197 |
< |
ircsprintf(to_send, "System clock is running backwards - (%lu < %lu)", |
| 198 |
< |
(unsigned long)newtime.tv_sec, (unsigned long)CurrentTime); |
| 197 |
> |
snprintf(to_send, sizeof(to_send), |
| 198 |
> |
"System clock is running backwards - (%lu < %lu)", |
| 199 |
> |
(unsigned long)newtime.tv_sec, (unsigned long)CurrentTime); |
| 200 |
|
report_error(L_ALL, to_send, me.name, 0); |
| 201 |
|
set_back_events(CurrentTime - newtime.tv_sec); |
| 202 |
|
} |
| 354 |
|
{ |
| 355 |
|
char buff[32]; |
| 356 |
|
unsigned int pid = (unsigned int)getpid(); |
| 357 |
< |
size_t nbytes = ircsprintf(buff, "%u\n", pid); |
| 357 |
> |
size_t nbytes = snprintf(buff, sizeof(buff), "%u\n", pid); |
| 358 |
|
|
| 359 |
|
if ((fbputs(buff, fb, nbytes) == -1)) |
| 360 |
|
ilog(L_ERROR, "Error writing %u to pid file %s (%s)", |