From: Joseph Morrow Date: Mon, 23 Mar 2015 20:21:36 +0000 (-0400) Subject: Cleaned up some misdirection when copying a string's value. X-Git-Tag: 1.2.0+RC1~1855^2~84 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5f46968dc1b377f36547b61900a3523f1eab971e;p=platform%2Fupstream%2Fiotivity.git Cleaned up some misdirection when copying a string's value. A weird case occurred where a char* string was referencing array location '0', then was being pass-by reference to appear as a "char*" which simply returned the origin char* string. Change-Id: I014207a4050d69cf5b8e2360f6c8d9d82a6c628e Signed-off-by: Joseph Morrow Reviewed-on: https://gerrit.iotivity.org/gerrit/542 Reviewed-by: Sakthivel Samidurai Tested-by: jenkins-iotivity Reviewed-by: Erich Keane --- diff --git a/resource/csdk/stack/src/ocstack.c b/resource/csdk/stack/src/ocstack.c index 92a94b8..7a2cee4 100644 --- a/resource/csdk/stack/src/ocstack.c +++ b/resource/csdk/stack/src/ocstack.c @@ -3540,7 +3540,7 @@ OCStackResult getQueryFromUri(const char * uri, char** query, char ** newURI) OCFree(tempURI); goto exit; } - strcpy(*query, &leftToken[0]); + strcpy(*query, leftToken); break; } leftToken = strtok_r(NULL, "?", &strTokPtr);