o Use __attribute__ (#ifdef __GNUC__) to type-check
LogPrintf() and prompt_Printf(), and fix the bits identified as being wrong as a result.
This commit is contained in:
parent
c02f378706
commit
fe3125a0c3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/cvs2svn/branches/MP/; revision=35317
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: bundle.c,v 1.1.2.53 1998/04/18 23:17:23 brian Exp $
|
||||
* $Id: bundle.c,v 1.1.2.54 1998/04/19 15:24:36 brian Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -744,7 +744,7 @@ bundle_SetRoute(struct bundle *bundle, int cmd, struct in_addr dst,
|
||||
cmdstr, inet_ntoa(dst), strerror(rtmes.m_rtm.rtm_errno));
|
||||
}
|
||||
LogPrintf(LogDEBUG, "wrote %d: cmd = %s, dst = %x, gateway = %x\n",
|
||||
wb, cmdstr, dst.s_addr, gateway.s_addr);
|
||||
wb, cmdstr, (unsigned)dst.s_addr, (unsigned)gateway.s_addr);
|
||||
close(s);
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: fsm.c,v 1.27.2.28 1998/04/16 00:25:58 brian Exp $
|
||||
* $Id: fsm.c,v 1.27.2.29 1998/04/19 15:24:41 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
@ -782,18 +782,17 @@ FsmRecvEchoReq(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp)
|
||||
{
|
||||
struct lcp *lcp = fsm2lcp(fp);
|
||||
u_char *cp;
|
||||
u_long *lp, magic;
|
||||
u_int32_t magic;
|
||||
|
||||
if (lcp) {
|
||||
cp = MBUF_CTOP(bp);
|
||||
lp = (u_long *) cp;
|
||||
magic = ntohl(*lp);
|
||||
magic = ntohl(*(u_int32_t *)cp);
|
||||
if (magic != lcp->his_magic) {
|
||||
LogPrintf(LogERROR, "RecvEchoReq: his magic is bad!!\n");
|
||||
/* XXX: We should send terminate request */
|
||||
}
|
||||
if (fp->state == ST_OPENED) {
|
||||
*lp = htonl(lcp->want_magic); /* Insert local magic number */
|
||||
*(u_int32_t *)cp = htonl(lcp->want_magic); /* local magic */
|
||||
FsmOutput(fp, CODE_ECHOREP, lhp->id, cp, plength(bp));
|
||||
}
|
||||
}
|
||||
@ -804,19 +803,18 @@ static void
|
||||
FsmRecvEchoRep(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp)
|
||||
{
|
||||
struct lcp *lcp = fsm2lcp(fp);
|
||||
u_long *lp, magic;
|
||||
u_int32_t magic;
|
||||
|
||||
if (lcp) {
|
||||
lp = (u_long *) MBUF_CTOP(bp);
|
||||
magic = ntohl(*lp);
|
||||
magic = ntohl(*(u_int32_t *)MBUF_CTOP(bp));
|
||||
/* Tolerate echo replies with either magic number */
|
||||
if (magic != 0 && magic != lcp->his_magic && magic != lcp->want_magic) {
|
||||
LogPrintf(LogWARN,
|
||||
"RecvEchoRep: Bad magic: expected 0x%08x, got: 0x%08x\n",
|
||||
lcp->his_magic, magic);
|
||||
/*
|
||||
* XXX: We should send terminate request. But poor implementation may die
|
||||
* as a result.
|
||||
* XXX: We should send terminate request. But poor implementations may
|
||||
* die as a result.
|
||||
*/
|
||||
}
|
||||
RecvEchoLqr(fp, bp);
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: id.c,v 1.6.4.4 1998/04/07 00:53:45 brian Exp $
|
||||
* $Id: id.c,v 1.6.4.5 1998/04/17 22:05:16 brian Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -87,7 +87,7 @@ ID0ioctl(int fd, unsigned long req, void *arg)
|
||||
|
||||
ID0set0();
|
||||
ret = ioctl(fd, req, arg);
|
||||
LogPrintf(LogID0, "%d = ioctl(%d, %d, %p)\n", ret, fd, req, arg);
|
||||
LogPrintf(LogID0, "%d = ioctl(%d, %lu, %p)\n", ret, fd, req, arg);
|
||||
ID0setuser();
|
||||
return ret;
|
||||
}
|
||||
@ -190,7 +190,7 @@ ID0login(struct utmp *ut)
|
||||
}
|
||||
login(ut);
|
||||
LogPrintf(LogID0, "login(\"%s\", \"%.*s\")\n",
|
||||
ut->ut_line, sizeof ut->ut_name, ut->ut_name);
|
||||
ut->ut_line, (int)(sizeof ut->ut_name), ut->ut_name);
|
||||
ID0setuser();
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: ipcp.c,v 1.50.2.38 1998/04/17 22:05:25 brian Exp $
|
||||
* $Id: ipcp.c,v 1.50.2.39 1998/04/19 03:40:59 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
* o More RFC1772 backwoard compatibility
|
||||
@ -722,11 +722,12 @@ static int
|
||||
AcceptableAddr(struct in_range *prange, struct in_addr ipaddr)
|
||||
{
|
||||
/* Is the given IP in the given range ? */
|
||||
LogPrintf(LogDEBUG, "requested = %x\n", htonl(ipaddr.s_addr));
|
||||
LogPrintf(LogDEBUG, "range = %x\n", htonl(prange->ipaddr.s_addr));
|
||||
LogPrintf(LogDEBUG, "/%x\n", htonl(prange->mask.s_addr));
|
||||
LogPrintf(LogDEBUG, "%x, %x\n", htonl(prange->ipaddr.s_addr & prange->
|
||||
mask.s_addr), htonl(ipaddr.s_addr & prange->mask.s_addr));
|
||||
LogPrintf(LogDEBUG, "requested = %x\n", (unsigned)htonl(ipaddr.s_addr));
|
||||
LogPrintf(LogDEBUG, "range = %x\n", (unsigned)htonl(prange->ipaddr.s_addr));
|
||||
LogPrintf(LogDEBUG, "/%x\n", (unsigned)htonl(prange->mask.s_addr));
|
||||
LogPrintf(LogDEBUG, "%x, %x\n",
|
||||
(unsigned)htonl(prange->ipaddr.s_addr & prange->mask.s_addr),
|
||||
(unsigned)htonl(ipaddr.s_addr & prange->mask.s_addr));
|
||||
return (prange->ipaddr.s_addr & prange->mask.s_addr) ==
|
||||
(ipaddr.s_addr & prange->mask.s_addr) && ipaddr.s_addr;
|
||||
}
|
||||
@ -738,7 +739,7 @@ IpcpDecodeConfig(struct fsm *fp, u_char * cp, int plen, int mode_type,
|
||||
/* Deal with incoming PROTO_IPCP */
|
||||
struct ipcp *ipcp = fsm2ipcp(fp);
|
||||
int type, length;
|
||||
u_long *lp, compproto;
|
||||
u_int32_t compproto;
|
||||
struct compreq *pcomp;
|
||||
struct in_addr ipaddr, dstipaddr, have_ip, dns[2], dnsnak[2];
|
||||
char tbuff[100], tbuff2[100];
|
||||
@ -760,8 +761,7 @@ IpcpDecodeConfig(struct fsm *fp, u_char * cp, int plen, int mode_type,
|
||||
|
||||
switch (type) {
|
||||
case TY_IPADDR: /* RFC1332 */
|
||||
lp = (u_long *) (cp + 2);
|
||||
ipaddr.s_addr = *lp;
|
||||
ipaddr.s_addr = *(u_int32_t *)(cp + 2);
|
||||
LogPrintf(LogIPCP, "%s %s\n", tbuff, inet_ntoa(ipaddr));
|
||||
|
||||
switch (mode_type) {
|
||||
@ -834,8 +834,7 @@ IpcpDecodeConfig(struct fsm *fp, u_char * cp, int plen, int mode_type,
|
||||
}
|
||||
break;
|
||||
case TY_COMPPROTO:
|
||||
lp = (u_long *) (cp + 2);
|
||||
compproto = htonl(*lp);
|
||||
compproto = htonl(*(u_int32_t *)(cp + 2));
|
||||
LogPrintf(LogIPCP, "%s %s\n", tbuff, vj2asc(compproto));
|
||||
|
||||
switch (mode_type) {
|
||||
@ -895,10 +894,8 @@ IpcpDecodeConfig(struct fsm *fp, u_char * cp, int plen, int mode_type,
|
||||
}
|
||||
break;
|
||||
case TY_IPADDRS: /* RFC1172 */
|
||||
lp = (u_long *) (cp + 2);
|
||||
ipaddr.s_addr = *lp;
|
||||
lp = (u_long *) (cp + 6);
|
||||
dstipaddr.s_addr = *lp;
|
||||
ipaddr.s_addr = *(u_int32_t *)(cp + 2);
|
||||
dstipaddr.s_addr = *(u_int32_t *)(cp + 6);
|
||||
snprintf(tbuff2, sizeof tbuff2, "%s %s,", tbuff, inet_ntoa(ipaddr));
|
||||
LogPrintf(LogIPCP, "%s %s\n", tbuff2, inet_ntoa(dstipaddr));
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: lcp.c,v 1.55.2.41 1998/04/07 00:53:55 brian Exp $
|
||||
* $Id: lcp.c,v 1.55.2.42 1998/04/16 00:26:05 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
* o Limit data field length by MRU
|
||||
@ -371,7 +371,7 @@ LcpDecodeConfig(struct fsm *fp, u_char *cp, int plen, int mode_type,
|
||||
/* Deal with incoming PROTO_LCP */
|
||||
struct lcp *lcp = fsm2lcp(fp);
|
||||
int type, length, sz, pos;
|
||||
u_int32_t *lp, magic, accmap;
|
||||
u_int32_t magic, accmap;
|
||||
u_short mtu, mru, *sp, proto;
|
||||
struct lqrreq *req;
|
||||
char request[20], desc[22];
|
||||
@ -421,8 +421,7 @@ LcpDecodeConfig(struct fsm *fp, u_char *cp, int plen, int mode_type,
|
||||
break;
|
||||
|
||||
case TY_ACCMAP:
|
||||
lp = (u_int32_t *) (cp + 2);
|
||||
accmap = htonl(*lp);
|
||||
accmap = htonl(*(u_int32_t *)(cp + 2));
|
||||
LogPrintf(LogLCP, "%s 0x%08lx\n", request, (u_long)accmap);
|
||||
|
||||
switch (mode_type) {
|
||||
@ -543,7 +542,7 @@ LcpDecodeConfig(struct fsm *fp, u_char *cp, int plen, int mode_type,
|
||||
|
||||
case TY_QUALPROTO:
|
||||
req = (struct lqrreq *)cp;
|
||||
LogPrintf(LogLCP, "%s proto %x, interval %dms\n",
|
||||
LogPrintf(LogLCP, "%s proto %x, interval %ldms\n",
|
||||
request, ntohs(req->proto), ntohl(req->period) * 10);
|
||||
switch (mode_type) {
|
||||
case MODE_REQ:
|
||||
@ -567,8 +566,7 @@ LcpDecodeConfig(struct fsm *fp, u_char *cp, int plen, int mode_type,
|
||||
break;
|
||||
|
||||
case TY_MAGICNUM:
|
||||
lp = (u_int32_t *) (cp + 2);
|
||||
magic = ntohl(*lp);
|
||||
magic = ntohl(*(u_int32_t *)(cp + 2));
|
||||
LogPrintf(LogLCP, "%s 0x%08lx\n", request, (u_long)magic);
|
||||
|
||||
switch (mode_type) {
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: log.h,v 1.18.2.2 1998/04/03 19:25:41 brian Exp $
|
||||
* $Id: log.h,v 1.18.2.3 1998/04/07 00:54:01 brian Exp $
|
||||
*/
|
||||
|
||||
#define LogMIN (1)
|
||||
@ -68,7 +68,12 @@ extern int LogIsKeptLocal(int, u_long);
|
||||
extern void LogOpen(const char *);
|
||||
extern void LogSetTun(int);
|
||||
extern void LogClose(void);
|
||||
#ifdef __GNUC__
|
||||
extern void LogPrintf(int, const char *,...)
|
||||
__attribute__ ((format (printf, 2, 3)));
|
||||
#else
|
||||
extern void LogPrintf(int, const char *,...);
|
||||
#endif
|
||||
extern void LogDumpBp(int, const char *, const struct mbuf *);
|
||||
extern void LogDumpBuff(int, const char *, const u_char *, int);
|
||||
extern void log_RegisterPrompt(struct prompt *);
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: lqr.c,v 1.22.2.24 1998/04/18 01:01:24 brian Exp $
|
||||
* $Id: lqr.c,v 1.22.2.25 1998/04/19 15:24:44 brian Exp $
|
||||
*
|
||||
* o LQR based on RFC1333
|
||||
*
|
||||
@ -92,7 +92,7 @@ RecvEchoLqr(struct fsm *fp, struct mbuf * bp)
|
||||
hdlc->lqm.echo.seq_recv = seq;
|
||||
} else
|
||||
LogPrintf(LogERROR, "RecvEchoLqr: Got sig 0x%08x, expecting 0x%08x !\n",
|
||||
ntohl(lqr->signature), SIGNATURE);
|
||||
(unsigned)ntohl(lqr->signature), (unsigned)SIGNATURE);
|
||||
} else
|
||||
LogPrintf(LogERROR, "RecvEchoLqr: Got packet size %d, expecting %d !\n",
|
||||
plength(bp), sizeof(struct echolqr));
|
||||
@ -177,7 +177,8 @@ LqrInput(struct physical *physical, struct mbuf *bp)
|
||||
lcp = physical->hdlc.lqm.owner;
|
||||
if (ntohl(lqr->MagicNumber) != physical->hdlc.lqm.owner->his_magic)
|
||||
LogPrintf(LogERROR, "LqrInput: magic %x != expecting %x\n",
|
||||
ntohl(lqr->MagicNumber), physical->hdlc.lqm.owner->his_magic);
|
||||
(unsigned)ntohl(lqr->MagicNumber),
|
||||
physical->hdlc.lqm.owner->his_magic);
|
||||
else {
|
||||
/*
|
||||
* Remember our PeerInLQRs, then convert byte order and save
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: modem.c,v 1.77.2.51 1998/04/17 22:04:32 brian Exp $
|
||||
* $Id: modem.c,v 1.77.2.52 1998/04/19 15:24:46 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
@ -582,8 +582,8 @@ modem_Open(struct physical *modem, struct bundle *bundle)
|
||||
if (modem->dev_is_modem && !Physical_IsSync(modem)) {
|
||||
tcgetattr(modem->fd, &rstio);
|
||||
modem->ios = rstio;
|
||||
LogPrintf(LogDEBUG, "modem_Open: modem (get): fd = %d, iflag = %x, "
|
||||
"oflag = %x, cflag = %x\n", modem->fd, rstio.c_iflag,
|
||||
LogPrintf(LogDEBUG, "modem_Open: modem (get): fd = %d, iflag = %lx, "
|
||||
"oflag = %lx, cflag = %lx\n", modem->fd, rstio.c_iflag,
|
||||
rstio.c_oflag, rstio.c_cflag);
|
||||
cfmakeraw(&rstio);
|
||||
if (modem->cfg.rts_cts)
|
||||
@ -605,7 +605,7 @@ modem_Open(struct physical *modem, struct bundle *bundle)
|
||||
modem->fd, modem->cfg.speed);
|
||||
}
|
||||
tcsetattr(modem->fd, TCSADRAIN, &rstio);
|
||||
LogPrintf(LogDEBUG, "modem (put): iflag = %x, oflag = %x, cflag = %x\n",
|
||||
LogPrintf(LogDEBUG, "modem (put): iflag = %lx, oflag = %lx, cflag = %lx\n",
|
||||
rstio.c_iflag, rstio.c_oflag, rstio.c_cflag);
|
||||
|
||||
if (ioctl(modem->fd, TIOCMGET, &modem->mbits) == -1)
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: prompt.h,v 1.1.2.6 1998/04/07 00:54:16 brian Exp $
|
||||
* $Id: prompt.h,v 1.1.2.7 1998/04/10 13:19:19 brian Exp $
|
||||
*/
|
||||
|
||||
#define LOCAL_AUTH 0x01
|
||||
@ -69,7 +69,12 @@ struct prompt {
|
||||
extern struct prompt *prompt_Create(struct server *, struct bundle *, int);
|
||||
extern void prompt_Destroy(struct prompt *, int);
|
||||
extern void prompt_Required(struct prompt *);
|
||||
#ifdef __GNUC__
|
||||
extern void prompt_Printf(struct prompt *, const char *, ...)
|
||||
__attribute__ ((format (printf, 2, 3)));
|
||||
#else
|
||||
extern void prompt_Printf(struct prompt *, const char *, ...);
|
||||
#endif
|
||||
extern void prompt_vPrintf(struct prompt *, const char *, _BSD_VA_LIST_);
|
||||
#define PROMPT_DONT_WANT_INT 1
|
||||
#define PROMPT_WANT_INT 0
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: sig.c,v 1.11.2.2 1998/04/06 09:12:36 brian Exp $
|
||||
* $Id: sig.c,v 1.11.2.3 1998/04/07 00:54:18 brian Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -58,7 +58,7 @@ pending_signal(int sig, sig_type fn)
|
||||
|
||||
if (sig <= 0 || sig > NSIG) {
|
||||
/* Oops - we must be a bit out of date (too many sigs ?) */
|
||||
LogPrintf(LogALERT, "Eeek! %s:%s: I must be out of date!\n",
|
||||
LogPrintf(LogALERT, "Eeek! %s:%d: I must be out of date!\n",
|
||||
__FILE__, __LINE__);
|
||||
return signal(sig, fn);
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: slcompress.c,v 1.15.2.6 1998/04/06 09:12:36 brian Exp $
|
||||
* $Id: slcompress.c,v 1.15.2.7 1998/04/07 00:54:19 brian Exp $
|
||||
*
|
||||
* Van Jacobson (van@helios.ee.lbl.gov), Dec 31, 1989:
|
||||
* - Initial distribution.
|
||||
@ -518,7 +518,7 @@ sl_uncompress_tcp(u_char ** bufp, int len, u_int type,
|
||||
} else
|
||||
cs->cs_ip.ip_id = htons(ntohs(cs->cs_ip.ip_id) + 1);
|
||||
|
||||
LogPrintf(LogDEBUG, "Uncompress: id = %04x, seq = %08x\n",
|
||||
LogPrintf(LogDEBUG, "Uncompress: id = %04x, seq = %08lx\n",
|
||||
cs->cs_ip.ip_id, ntohl(th->th_seq));
|
||||
|
||||
/*
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: timer.c,v 1.27.2.5 1998/04/17 22:04:36 brian Exp $
|
||||
* $Id: timer.c,v 1.27.2.6 1998/04/18 23:17:26 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
@ -90,7 +90,7 @@ StartTimer(struct pppTimer * tp)
|
||||
|
||||
if (t)
|
||||
LogPrintf(LogDEBUG, "StartTimer: Inserting %s timer[%p] before %s "
|
||||
"timer[%p], delta = %d\n", tp->name, tp, t->name, t, tp->rest);
|
||||
"timer[%p], delta = %ld\n", tp->name, tp, t->name, t, tp->rest);
|
||||
else
|
||||
LogPrintf(LogDEBUG, "StartTimer: Inserting %s timer[%p]\n", tp->name, tp);
|
||||
|
||||
@ -206,7 +206,7 @@ ShowTimers(int LogLevel, struct prompt *prompt)
|
||||
#define SECS(val) ((val) / SECTICKS)
|
||||
#define HSECS(val) (((val) % SECTICKS) * 100 / SECTICKS)
|
||||
#define DISP \
|
||||
"%s timer[%p]: freq = %d.%02ds, next = %d.%02ds, state = %s\n", \
|
||||
"%s timer[%p]: freq = %ld.%02lds, next = %d.%02ds, state = %s\n", \
|
||||
pt->name, pt, SECS(pt->load), HSECS(pt->load), SECS(rest), \
|
||||
HSECS(rest), tState2Nam(pt->state)
|
||||
|
||||
@ -245,7 +245,7 @@ nointr_dosleep(u_int sec, u_int usec)
|
||||
(to.tv_sec == et.tv_sec + 1 && to.tv_usec > et.tv_usec) ||
|
||||
to.tv_sec < st.tv_sec ||
|
||||
(to.tv_sec == st.tv_sec && to.tv_usec < st.tv_usec)) {
|
||||
LogPrintf(LogWARN, "Clock adjusted between %d and %d seconds "
|
||||
LogPrintf(LogWARN, "Clock adjusted between %ld and %ld seconds "
|
||||
"during sleep !\n",
|
||||
to.tv_sec - st.tv_sec, sec + to.tv_sec - st.tv_sec);
|
||||
st.tv_sec = to.tv_sec;
|
||||
|
Loading…
Reference in New Issue
Block a user