OSSP CVS Repository

ossp - Difference in ossp-pkg/sio/al_test.c versions 1.3 and 1.4
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/sio/al_test.c 1.3 -> 1.4

--- al_test.c    2002/10/14 13:34:25     1.3
+++ al_test.c    2002/10/14 15:26:04     1.4
@@ -76,7 +76,7 @@
     free(buf);
 }
 
-void checklen(al_t *al)
+void checklen(const char *tag, al_t *al)
 {
     al_tx_t *tx; 
     al_chunk_t *cur;
@@ -93,7 +93,8 @@
     total2 = al_bytes(al);
 
     if (total != total2)
-        printf("ERROR: al_bytes(%p): %d != %d\n",al,total,total2);
+        printf("ERROR: al_bytes(%s=%p): count %d != sum %d\n",
+            tag,al,total,total2);
 }
 
 int main()
@@ -126,9 +127,9 @@
 #endif
     printf("splice result: %d (%s)\n\n",rc,al_error(rc));
 
-    checklen(al);
-    checklen(al2);
-    checklen(al3);
+    checklen("SPLICED",al);
+    checklen("BUFFER",al2);
+    checklen("REPLACEMENT",al3);
 
     DUMP("SPLICED",al);
     print("SPLICED", al);
@@ -139,8 +140,16 @@
     DUMP("REPLACEMENT", al3);
     print("REPLACEMENT", al3);
 
+    printf("free REPLACEMENT\n");
+    fflush(stdout);
     al_destroy(al3);
+
+    printf("free BUFFER\n");
+    fflush(stdout);
     al_destroy(al2);
+
+    printf("free SPLICED\n");
+    fflush(stdout);
     al_destroy(al);
 
 

CVSTrac 2.0.1