diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2015-12-16 01:54:03 -0500 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2015-12-16 01:54:03 -0500 |
commit | 70936d8b534d326e6b7bdde5d28fa839a6a33986 (patch) | |
tree | 3e4485f0d809e45e383dfb4d2db4621115be7b20 /WWW/Library/Implementation/HTGopher.c | |
parent | 769b6cceb3e3a602353f47b91c1214dd47455966 (diff) | |
download | lynx-snapshots-70936d8b534d326e6b7bdde5d28fa839a6a33986.tar.gz |
snapshot of project "lynx", label v2-8-9dev_6o
Diffstat (limited to 'WWW/Library/Implementation/HTGopher.c')
-rw-r--r-- | WWW/Library/Implementation/HTGopher.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/WWW/Library/Implementation/HTGopher.c b/WWW/Library/Implementation/HTGopher.c index 665006a4..30577a9d 100644 --- a/WWW/Library/Implementation/HTGopher.c +++ b/WWW/Library/Implementation/HTGopher.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTGopher.c,v 1.61 2013/11/28 11:12:32 tom Exp $ + * $LynxId: HTGopher.c,v 1.62 2015/12/16 01:17:53 tom Exp $ * * GOPHER ACCESS HTGopher.c * ============= @@ -1227,7 +1227,7 @@ static int generate_cso_report(HTStream *Target) char line[BIG]; char *buf = 0; char *p = line, *href = NULL; - int len, i, prev_ndx, ndx; + int i, prev_ndx, ndx; char *rcode, *ndx_str, *fname, *fvalue, *l; CSOfield_info *fld; BOOL stop = FALSE; @@ -1263,16 +1263,14 @@ static int generate_cso_report(HTStream *Target) } rcode = (p[0] == '-') ? &p[1] : p; ndx_str = fname = NULL; - len = (int) strlen(p); - for (i = 0; i < len; i++) { + for (i = 0; p[i] != '\0'; i++) { if (p[i] == ':') { p[i] = '\0'; - if (!ndx_str) { - fname = ndx_str = &p[i + 1]; - } else { - fname = &p[i + 1]; + fname = &p[i + 1]; + if (ndx_str) { break; } + ndx_str = fname; } } if (ndx_str) { |