add icmp statistics printing
[unix-history] / usr / src / usr.bin / xstr / xstr.c
index d5644a5..56221af 100644 (file)
@@ -1,4 +1,4 @@
-static char *sccsid = "@(#)xstr.c      4.2 (Berkeley) %G%";
+static char *sccsid = "@(#)xstr.c      4.3 (Berkeley) %G%";
 #include <stdio.h>
 #include <ctype.h>
 #include <sys/types.h>
 #include <stdio.h>
 #include <ctype.h>
 #include <sys/types.h>
@@ -295,6 +295,8 @@ flushsh()
        if (new == 0 && old != 0)
                return;
        mesgwrit = fopen(strings, old ? "r+" : "w");
        if (new == 0 && old != 0)
                return;
        mesgwrit = fopen(strings, old ? "r+" : "w");
+       if (mesgwrit == NULL)
+               perror(strings), exit(4);
        for (i = 0; i < BUCKETS; i++)
                for (hp = bucket[i].hnext; hp != NULL; hp = hp->hnext) {
                        found(hp->hnew, hp->hpt, hp->hstr);
        for (i = 0; i < BUCKETS; i++)
                for (hp = bucket[i].hnext; hp != NULL; hp = hp->hnext) {
                        found(hp->hnew, hp->hpt, hp->hstr);