From 9ffb0038ded686a177b06f268f08c9bcd48128b2 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 30 Nov 2015 13:59:05 +0100 Subject: [FUSE] Compiles again --- src/shared/sockhelper.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/shared/sockhelper.c') diff --git a/src/shared/sockhelper.c b/src/shared/sockhelper.c index 0b7a1db..3748d38 100644 --- a/src/shared/sockhelper.c +++ b/src/shared/sockhelper.c @@ -1,5 +1,5 @@ #include "sockhelper.h" -//#include "log.h" +#include "log.h" #include #include #include // inet_ntop @@ -80,7 +80,7 @@ int sock_resolveToDnbd3Host(const char * const address, dnbd3_host_t * const des // See if we have a port snprintf( bufferAddr, sizeof bufferAddr, "%s", address ); - const char *c1, *c2; + char *c1, *c2; c1 = strchr( addr, ':' ); if ( c1 != NULL ) { c2 = strchr( c1 + 1, ':' ); @@ -93,8 +93,8 @@ int sock_resolveToDnbd3Host(const char * const address, dnbd3_host_t * const des c1 = strchr( c2 + 1, ':' ); if ( c1 != NULL ) c2 = c1; } while ( c1 != NULL ); - if ( c2[-1] == ']' ) { - c2[-1] = '\0'; + if ( *(c2 - 1 ) == ']' ) { + *( c2 - 1 ) = '\0'; *c2 = '\0'; addr += 1; portStr = c2 + 1; -- cgit v1.2.3-55-g7522