From 1558412cee1810249c5c3e47d3a3d8fd3d61d154 Mon Sep 17 00:00:00 2001 From: Alexandru Bogdan Stefan Date: Thu, 5 May 2016 15:28:55 +0300 Subject: [PATCH] Ident variable assignments to respect coding style --- shellinabox/service.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/shellinabox/service.c b/shellinabox/service.c index eee1d3c..5cbb1b7 100644 --- a/shellinabox/service.c +++ b/shellinabox/service.c @@ -127,20 +127,20 @@ void initService(struct Service *service, const char *arg) { if ((ptr = strchr(arg, ':')) != NULL) { ptr = ptr + 1; if (*ptr) { - char * tmp = strchr(ptr, ':'); + char * tmp = strchr(ptr, ':'); if(tmp == NULL)//if the second ":" is not found, keep as host whatever is after first ":" { free(host); - host = strdup(ptr); + host = strdup(ptr); } else // if we find a second ":", keep as a host whatever is in between first ":" and second ":" and as sshPort whatever is after second ":" { - int size = (tmp - ptr + 1); + int size = (tmp - ptr + 1); free(host); - host = malloc(size); + host = malloc(size); memset(host, 0, size); - memcpy(host, ptr , size-1); - sshPort = strdup (tmp + 1); + memcpy(host, ptr , size - 1); + sshPort = strdup (tmp + 1); } } }