Skip to content

Commit

Permalink
ifdef a variable like its use
Browse files Browse the repository at this point in the history
  • Loading branch information
martin committed Sep 14, 2013
1 parent 2f0acf3 commit 8ac2f6a
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions sys/kern/kern_tc.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $NetBSD: kern_tc.c,v 1.45 2013/05/26 18:07:42 kardel Exp $ */
/* $NetBSD: kern_tc.c,v 1.46 2013/09/14 20:52:43 martin Exp $ */

/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
Expand Down Expand Up @@ -40,7 +40,7 @@

#include <sys/cdefs.h>
/* __FBSDID("$FreeBSD: src/sys/kern/kern_tc.c,v 1.166 2005/09/19 22:16:31 andre Exp $"); */
__KERNEL_RCSID(0, "$NetBSD: kern_tc.c,v 1.45 2013/05/26 18:07:42 kardel Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_tc.c,v 1.46 2013/09/14 20:52:43 martin Exp $");

#ifdef _KERNEL_OPT
#include "opt_ntp.h"
Expand Down Expand Up @@ -992,7 +992,10 @@ pps_ref_event(struct pps_state *pps,
struct timespec ts, *tsp, *osp;
struct timehands *th;
u_int64_t tcount, acount, dcount, *pcount;
int foff, fhard, gen;
int foff, gen;
#ifdef PPS_SYNC
int fhard;
#endif
pps_seq_t *pseq;

KASSERT(mutex_owned(&timecounter_lock));
Expand Down Expand Up @@ -1049,14 +1052,18 @@ pps_ref_event(struct pps_state *pps,
tsp = &pps->ppsinfo.assert_timestamp;
osp = &pps->ppsparam.assert_offset;
foff = pps->ppsparam.mode & PPS_OFFSETASSERT;
#ifdef PPS_SYNC
fhard = pps->kcmode & PPS_CAPTUREASSERT;
#endif
pcount = &pps->ppscount[0];
pseq = &pps->ppsinfo.assert_sequence;
} else {
tsp = &pps->ppsinfo.clear_timestamp;
osp = &pps->ppsparam.clear_offset;
foff = pps->ppsparam.mode & PPS_OFFSETCLEAR;
#ifdef PPS_SYNC
fhard = pps->kcmode & PPS_CAPTURECLEAR;
#endif
pcount = &pps->ppscount[1];
pseq = &pps->ppsinfo.clear_sequence;
}
Expand Down

0 comments on commit 8ac2f6a

Please sign in to comment.