Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/tftp Fix sendto return value check (incomplete chang...



details:   https://anonhg.NetBSD.org/src/rev/07a59be5396e
branches:  trunk
changeset: 542560:07a59be5396e
user:      wiz <wiz%NetBSD.org@localhost>
date:      Sat Feb 01 16:42:31 2003 +0000

description:
Fix sendto return value check (incomplete change in 1.14).
Noted by Brian Ginsbach in PR 19842.

diffstat:

 usr.bin/tftp/tftp.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r f6f71ad3269f -r 07a59be5396e usr.bin/tftp/tftp.c
--- a/usr.bin/tftp/tftp.c       Sat Feb 01 14:57:02 2003 +0000
+++ b/usr.bin/tftp/tftp.c       Sat Feb 01 16:42:31 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tftp.c,v 1.15 2000/12/30 18:00:18 itojun Exp $ */
+/*     $NetBSD: tftp.c,v 1.16 2003/02/01 16:42:31 wiz Exp $    */
 
 /*
  * Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)tftp.c     8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: tftp.c,v 1.15 2000/12/30 18:00:18 itojun Exp $");
+__RCSID("$NetBSD: tftp.c,v 1.16 2003/02/01 16:42:31 wiz Exp $");
 #endif
 #endif /* not lint */
 
@@ -402,7 +402,7 @@
        msglen = &tp->th_msg[length + 1] - ackbuf;
        if (trace)
                tpacket("sent", tp, (int)msglen);
-       if (sendto(f, ackbuf, msglen, 0, peer, peer->sa_len) != length)
+       if (sendto(f, ackbuf, msglen, 0, peer, peer->sa_len) != msglen)
                warn("nak");
 }
 



Home | Main Index | Thread Index | Old Index