This commit is contained in:
Ward Fisher 2012-08-08 21:29:57 +00:00
parent c8e9772237
commit 402c4277e1
2 changed files with 3 additions and 3 deletions

View File

@ -131,7 +131,7 @@ nc_uriparse(const char* uri0, NC_URI** nc_urip)
host = p;
port = strchr(p,':');
if(!strncmp(protocol,"file",4)) {
if(strncmp(protocol,"file",4)) {
if(port) {
*port++ = '\0';
}

View File

@ -189,9 +189,9 @@ ocuriparse(const char* uri0, OCURI** ocurip)
/* extract host and port */
p = host;
port = strchr(p,':');
if(!strncmp(protocol,"file",4)) {
if(strncmp(protocol,"file",4)) {
if(port!=NULL)
*port++ = '\0';
}