Module Name: src
Committed By: rin
Date: Sun Aug 7 05:51:55 UTC 2022
Modified Files:
src/sys/lib/libsa: tftp.c
Log Message:
Consistently use ntohs() instead of htons() when converting from
network to host byte order.
No binary changes both for big and little endian.
To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/lib/libsa/tftp.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/lib/libsa/tftp.c
diff -u src/sys/lib/libsa/tftp.c:1.37 src/sys/lib/libsa/tftp.c:1.38
--- src/sys/lib/libsa/tftp.c:1.37 Fri Mar 26 10:35:08 2021
+++ src/sys/lib/libsa/tftp.c Sun Aug 7 05:51:55 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: tftp.c,v 1.37 2021/03/26 10:35:08 rin Exp $ */
+/* $NetBSD: tftp.c,v 1.38 2022/08/07 05:51:55 rin Exp $ */
/*
* Copyright (c) 1996
@@ -114,7 +114,7 @@ recvtftp(struct iodesc *d, void *pkt, si
t = (struct tftphdr *)pkt;
switch (ntohs(t->th_opcode)) {
case DATA:
- if (htons(t->th_block) != d->xid) {
+ if (ntohs(t->th_block) != d->xid) {
/*
* Expected block?
*/