summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
Diffstat (limited to 'libexec')
-rw-r--r--libexec/bootpd/rtmsg.c6
-rw-r--r--libexec/mknetid/parse_group.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/libexec/bootpd/rtmsg.c b/libexec/bootpd/rtmsg.c
index b691edc..8b81dab 100644
--- a/libexec/bootpd/rtmsg.c
+++ b/libexec/bootpd/rtmsg.c
@@ -126,7 +126,7 @@ int bsd_arp_set(ia, eaddr, len)
register struct sockaddr_dl *sdl;
register struct rt_msghdr *rtm = &(m_rtmsg.m_rtm);
u_char *ea;
- struct timeval time;
+ struct timespec tp;
int op = RTM_ADD;
getsocket();
@@ -140,8 +140,8 @@ int bsd_arp_set(ia, eaddr, len)
doing_proxy = flags = export_only = expire_time = 0;
/* make arp entry temporary */
- gettimeofday(&time, 0);
- expire_time = time.tv_sec + 20 * 60;
+ clock_gettime(CLOCK_MONOTONIC, &tp);
+ expire_time = tp.tv_sec + 20 * 60;
tryagain:
if (rtmsg(RTM_GET) < 0) {
diff --git a/libexec/mknetid/parse_group.c b/libexec/mknetid/parse_group.c
index b34ee11..84cb991 100644
--- a/libexec/mknetid/parse_group.c
+++ b/libexec/mknetid/parse_group.c
@@ -126,7 +126,7 @@ grscan(int search, int gid)
if (_gr_group.gr_name[0] == '+')
continue;
if ((_gr_group.gr_passwd = strsep(&bp, ":\n")) == NULL)
- break;;
+ break;
if (!(cp = strsep(&bp, ":\n")))
continue;
_gr_group.gr_gid = atoi(cp);
OpenPOWER on IntegriCloud