ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/ircd.c
(Generate patch)

Comparing ircd-hybrid-7.3/src/ircd.c (file contents):
Revision 1123 by michael, Sun Jan 9 11:03:03 2011 UTC vs.
Revision 1124 by michael, Mon Feb 7 11:45:27 2011 UTC

# Line 34 | Line 34
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"
# Line 195 | Line 194 | set_time(void)
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    }
# Line 354 | Line 354 | write_pidfile(const char *filename)
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)",

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)