author | Michael Krelin <hacker@klever.net> | 2008-02-08 22:16:15 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2008-02-08 22:16:15 (UTC) |
commit | 16667a21c3052c89218d3e56098f0fc29dca2f1a (patch) (unidiff) | |
tree | 7154633a771b96da02cc4c980167b7ad92b6d27e /lib/discovery.cc | |
parent | f2ba7be73a62d115f293f5d690efabcafd5fcf4f (diff) | |
download | libopkele-16667a21c3052c89218d3e56098f0fc29dca2f1a.zip libopkele-16667a21c3052c89218d3e56098f0fc29dca2f1a.tar.gz libopkele-16667a21c3052c89218d3e56098f0fc29dca2f1a.tar.bz2 |
minor fixes and making compiler a bit happier
Signed-off-by: Michael Krelin <hacker@klever.net>
-rw-r--r-- | lib/discovery.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/discovery.cc b/lib/discovery.cc index 6f58339..6f9926c 100644 --- a/lib/discovery.cc +++ b/lib/discovery.cc | |||
@@ -327,13 +327,13 @@ namespace opkele { | |||
327 | const char *colon = (const char*)memchr(p,':',bytes); | 327 | const char *colon = (const char*)memchr(p,':',bytes); |
328 | const char *space = (const char*)memchr(p,' ',bytes); | 328 | const char *space = (const char*)memchr(p,' ',bytes); |
329 | if(space && ( (!colon) || space<colon ) ) { | 329 | if(space && ( (!colon) || space<colon ) ) { |
330 | xrds_location.clear(); http_content_type.clear(); | 330 | xrds_location.clear(); http_content_type.clear(); |
331 | }else if(colon) { | 331 | }else if(colon) { |
332 | const char *hv = ++colon; | 332 | const char *hv = ++colon; |
333 | int hnl = colon-h; | 333 | size_t hnl = colon-h; |
334 | int rb; | 334 | int rb; |
335 | for(rb = bytes-hnl-1;rb>0 && isspace(*hv);++hv,--rb); | 335 | for(rb = bytes-hnl-1;rb>0 && isspace(*hv);++hv,--rb); |
336 | while(rb>0 && isspace(hv[rb-1])) --rb; | 336 | while(rb>0 && isspace(hv[rb-1])) --rb; |
337 | if(rb) { | 337 | if(rb) { |
338 | if( (hnl>=sizeof(XRDS_HEADER)) | 338 | if( (hnl>=sizeof(XRDS_HEADER)) |
339 | && !strncasecmp(h,XRDS_HEADER":", | 339 | && !strncasecmp(h,XRDS_HEADER":", |