summaryrefslogtreecommitdiffstats
path: root/sys/netatm
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2003-02-23 22:26:39 +0000
committerobrien <obrien@FreeBSD.org>2003-02-23 22:26:39 +0000
commit9e9a8e4f69fd3a29422980ec3afff8db3d1b4335 (patch)
treec959e1223de699b635d1e54fb59145b4eb917919 /sys/netatm
parent76e7d7e7b73fccbbb65827f7257fdc2fa166710e (diff)
downloadFreeBSD-src-9e9a8e4f69fd3a29422980ec3afff8db3d1b4335.zip
FreeBSD-src-9e9a8e4f69fd3a29422980ec3afff8db3d1b4335.tar.gz
There is no reason to be cute with ntohl(). Just call it directly rather
than use a macro that tries to do conversions in place. Compile tested on: sparc64
Diffstat (limited to 'sys/netatm')
-rw-r--r--sys/netatm/port.h14
-rw-r--r--sys/netatm/uni/q2110_sigcpcs.c2
-rw-r--r--sys/netatm/uni/qsaal1_sigcpcs.c2
-rw-r--r--sys/netatm/uni/sscop_sigcpcs.c10
-rw-r--r--sys/netatm/uni/sscop_subr.c2
5 files changed, 8 insertions, 22 deletions
diff --git a/sys/netatm/port.h b/sys/netatm/port.h
index df599ad..d8c7ceb 100644
--- a/sys/netatm/port.h
+++ b/sys/netatm/port.h
@@ -282,20 +282,6 @@ typedef void KTimeout_ret;
#endif /* _KERNEL */
-#ifndef NTOHL
-#if BYTE_ORDER == BIG_ENDIAN
-#define NTOHL(x) (x)
-#define NTOHS(x) (x)
-#define HTONL(x) (x)
-#define HTONS(x) (x)
-#else
-#define NTOHL(x) (x) = ntohl((u_long)(x))
-#define NTOHS(x) (x) = ntohs((u_short)(x))
-#define HTONL(x) (x) = htonl((u_long)(x))
-#define HTONS(x) (x) = htons((u_short)(x))
-#endif
-#endif /* NTOHL */
-
#ifndef MAX
#define MAX(a,b) max((a),(b))
#endif
diff --git a/sys/netatm/uni/q2110_sigcpcs.c b/sys/netatm/uni/q2110_sigcpcs.c
index 1aaaf4d..35444ad 100644
--- a/sys/netatm/uni/q2110_sigcpcs.c
+++ b/sys/netatm/uni/q2110_sigcpcs.c
@@ -1729,7 +1729,7 @@ sscop_poll_ready(sop, m, trlr)
struct poll_pdu *pp = (struct poll_pdu *)trlr;
sscop_seq nps;
- NTOHL(pp->poll_ns);
+ pp->poll_ns = ntohl(pp->poll_ns);
/*
* If the poll sequence number is less than highest number
diff --git a/sys/netatm/uni/qsaal1_sigcpcs.c b/sys/netatm/uni/qsaal1_sigcpcs.c
index 080c002..50ba1d7 100644
--- a/sys/netatm/uni/qsaal1_sigcpcs.c
+++ b/sys/netatm/uni/qsaal1_sigcpcs.c
@@ -1395,7 +1395,7 @@ sscop_poll_ready(sop, m, trlr)
struct poll_pdu *pp = (struct poll_pdu *)trlr;
sscop_seq nps;
- NTOHL(pp->poll_ns);
+ pp->poll_ns = ntohl(pp->poll_ns);
/*
* If the poll sequence number is less than highest number
diff --git a/sys/netatm/uni/sscop_sigcpcs.c b/sys/netatm/uni/sscop_sigcpcs.c
index 592415b..1a27b6c 100644
--- a/sys/netatm/uni/sscop_sigcpcs.c
+++ b/sys/netatm/uni/sscop_sigcpcs.c
@@ -1756,9 +1756,9 @@ sscop_stat_ready(sop, m, trlr)
sscop_seq seq1, seq2, opa;
int cnt = 0;
- NTOHL(sp->stat_nps);
- NTOHL(sp->stat_nmr);
- NTOHL(sp->stat_nr);
+ sp->stat_nps = ntohl(sp->stat_nps);
+ sp->stat_nmr = ntohl(sp->stat_nmr);
+ sp->stat_nr = ntohl(sp->stat_nr);
/*
* Validate peer's received poll sequence number
@@ -2144,8 +2144,8 @@ sscop_ustat_ready(sop, m, trlr)
struct pdu_hdr *php;
sscop_seq seq1, seq2;
- NTOHL(up->ustat_nmr);
- NTOHL(up->ustat_nr);
+ up->ustat_nmr = ntohl(up->ustat_nmr);
+ up->ustat_nr = ntohl(up->ustat_nr);
/*
* Validate peer's current receive data sequence number
diff --git a/sys/netatm/uni/sscop_subr.c b/sys/netatm/uni/sscop_subr.c
index c4f29ec..051b133 100644
--- a/sys/netatm/uni/sscop_subr.c
+++ b/sys/netatm/uni/sscop_subr.c
@@ -147,7 +147,7 @@ sscop_stat_getelem(m, pelem)
/*
* Put element (sequence number) into host order
*/
- NTOHL(*pelem);
+ *pelem = ntohl(*pelem);
/*
* Get pointers set for next call
OpenPOWER on IntegriCloud