diff options
author | brian <brian@FreeBSD.org> | 1998-09-15 17:22:20 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1998-09-15 17:22:20 +0000 |
commit | 9a318dd66f83207c7abcee476e380d062939ea19 (patch) | |
tree | 8a0df5c84859a7a35a4ee5469cba39608b9cde4b | |
parent | 7559839366417732fc62acabf45ecf90b94b1ef9 (diff) | |
download | FreeBSD-src-9a318dd66f83207c7abcee476e380d062939ea19.zip FreeBSD-src-9a318dd66f83207c7abcee476e380d062939ea19.tar.gz |
Correct ua_ntohs.
-rw-r--r-- | usr.sbin/ppp/ua.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/ppp/ua.h b/usr.sbin/ppp/ua.h index 8f353e2..fb68e98 100644 --- a/usr.sbin/ppp/ua.h +++ b/usr.sbin/ppp/ua.h @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id:$ + * $Id: ua.h,v 1.1 1998/09/04 18:26:00 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) |