Source-Changes-HG archive

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

[src/trunk]: src/lib/librumpuser return correct value when reading a short frame



details:   https://anonhg.NetBSD.org/src/rev/f2ba9330fd2f
branches:  trunk
changeset: 763013:f2ba9330fd2f
user:      pooka <pooka%NetBSD.org@localhost>
date:      Tue Mar 08 10:02:01 2011 +0000

description:
return correct value when reading a short frame

diffstat:

 lib/librumpuser/sp_common.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (21 lines):

diff -r 27fa193622ad -r f2ba9330fd2f lib/librumpuser/sp_common.c
--- a/lib/librumpuser/sp_common.c       Tue Mar 08 09:49:42 2011 +0000
+++ b/lib/librumpuser/sp_common.c       Tue Mar 08 10:02:01 2011 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: sp_common.c,v 1.28 2011/02/15 10:37:07 pooka Exp $    */
+/*      $NetBSD: sp_common.c,v 1.29 2011/03/08 10:02:01 pooka Exp $    */
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -419,8 +419,9 @@
                }
 
                spc->spc_off += n;
-               if (spc->spc_off < HDRSZ)
-                       return -1;
+               if (spc->spc_off < HDRSZ) {
+                       return 0;
+               }
 
                /*LINTED*/
                framelen = spc->spc_hdr.rsp_len;



Home | Main Index | Thread Index | Old Index