Having now compiled the last few days' changes with MSVC, it's turned
[u/mdw/putty] / tree234.c
index 1f02670..9d1d7b0 100644 (file)
--- a/tree234.c
+++ b/tree234.c
@@ -90,6 +90,8 @@ void freetree234(tree234 *t) {
 static int countnode234(node234 *n) {
     int count = 0;
     int i;
+    if (!n)
+       return 0;
     for (i = 0; i < 4; i++)
        count += n->counts[i];
     for (i = 0; i < 3; i++)
@@ -570,7 +572,6 @@ static void *delpos234_internal(tree234 *t, int index) {
     LOG(("deleting item %d from tree %p\n", index, t));
     while (1) {
        while (n) {
-           int c;
            int ki;
            node234 *sub;