summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorbrian <brian@cvs.openbsd.org>1998-09-15 17:21:59 +0000
committerbrian <brian@cvs.openbsd.org>1998-09-15 17:21:59 +0000
commite66ee966e48c65b9c81757630a6d574b64a99eaf (patch)
treec29c59e0bc8d84730e28bd10b6ce9b7c95aa08dd /usr.sbin
parentea1c3196105b31a23971cb11866a711a90185bde (diff)
Correct ua_ntohs.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ppp/ppp/ua.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/ppp/ppp/ua.h b/usr.sbin/ppp/ppp/ua.h
index 50fb8702ff7..a4c16fc1e63 100644
--- a/usr.sbin/ppp/ppp/ua.h
+++ b/usr.sbin/ppp/ppp/ua.h
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: ua.h,v 1.1 1998/09/04 18:27:47 brian Exp $
+ * $Id: ua.h,v 1.2 1998/09/15 17:21:58 brian Exp $
*/
#ifdef __i386__ /* Do any other archs not care about alignment ? */
@@ -65,9 +65,9 @@
# define ua_ntohs(src, tgt) \
do { \
- u_int32_t __nh; \
- __nh = ((u_int32_t)*(u_char *)(src) << 8) | \
- (u_int32_t)*((u_char *)(src) + 1); \
+ u_int16_t __nh; \
+ __nh = ((u_int16_t)*(u_char *)(src) << 8) | \
+ (u_int16_t)*((u_char *)(src) + 1); \
memcpy((tgt), &__nh, sizeof __nh); \
} while (0)