1 --- a/dnsfilter.c Thu Feb 15 21:29:28 2001
2 +++ b/dnsfilter.c Thu Feb 15 21:57:36 2001
16 - if (!stralloc_copys(&x[i].middle,":")) nomem();
17 - if (!stralloc_cats(&x[i].middle,error_str(errno))) nomem();
18 - for (j = 0;j < x[i].middle.len;++j)
19 - if (x[i].middle.s[j] == ' ')
20 - x[i].middle.s[j] = '-';
25 + if (!stralloc_copys(&x[i].middle,":")) nomem();
26 + if (!stralloc_cats(&x[i].middle,error_str(errno))) nomem();
27 + for (j = 0;j < x[i].middle.len;++j)
28 + if (x[i].middle.s[j] == ' ')
29 + x[i].middle.s[j] = '-';
33 int main(int argc,char **argv)
38 - while ((opt = getopt(argc,argv,"c:l:")) != opteof)
39 + while ((opt = getopt(argc,argv,"c:l:r")) != opteof)
42 scan_ulong(optarg,&u);
44 if (u > 1000000) u = 1000000;
51 - strerr_die1x(111,"dnsfilter: usage: dnsfilter [ -c concurrency ] [ -l lines ]");
52 + strerr_die1x(111,"dnsfilter: usage: dnsfilter [ -c concurrency ] [ -l lines ] [-r]");
55 x = (struct line *) alloc(xmax * sizeof(struct line));
58 if (dns_name_packet(&x[i].middle,x[i].dt.packet,x[i].dt.packetlen) == -1)
60 - if (x[i].middle.len)
61 - if (!stralloc_cats(&x[i].left,"=")) nomem();
62 + if (x[i].middle.len) {
64 + if (!stralloc_copys(&x[i].left, "")) nomem();
66 + if (!stralloc_cats(&x[i].left, "=")) nomem();