INN commit: trunk (nnrpd/group.c tests/storage/sm.t)

INN Commit Russ_Allbery at isc.org
Sun Aug 24 18:51:10 UTC 2008


    Date: Sunday, August 24, 2008 @ 11:51:09
  Author: iulius
Revision: 7970

Fix a cast to an unsigned int.
Fix the test suite because sm now returns real headers (without the empty
line at the end):  it is the sed "Q" option which should be used, and not "q".

Modified:
  trunk/nnrpd/group.c
  trunk/tests/storage/sm.t

--------------------+
 nnrpd/group.c      |    2 +-
 tests/storage/sm.t |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Modified: nnrpd/group.c
===================================================================
--- nnrpd/group.c	2008-08-24 18:14:20 UTC (rev 7969)
+++ nnrpd/group.c	2008-08-24 18:51:09 UTC (rev 7970)
@@ -137,7 +137,7 @@
 			ARThigh = prev;
                         /* No need to update the count since it is only
                          * an estimate but make sure it is not too high. */
-                        if (count > ARThigh - ARTlow)
+                        if ((unsigned int)count > ARThigh - ARTlow)
                             count = ARThigh - ARTlow + 1;
 			break;
 		    }

Modified: tests/storage/sm.t
===================================================================
--- tests/storage/sm.t	2008-08-24 18:14:20 UTC (rev 7969)
+++ tests/storage/sm.t	2008-08-24 18:51:09 UTC (rev 7970)
@@ -79,7 +79,7 @@
 # Check retrieval of only the headers, given a token and a path to the real
 # article.
 headers () {
-    sed '/^$/q' "$2" > spool/real
+    sed '/^$/Q' "$2" > spool/real
     "$sm" -H "$1" > spool/test
     if [ $? = 0 ] && diff spool/real spool/test ; then
         printcount "ok"



More information about the inn-committers mailing list