Clean unittest query building slightly
In two unit tests a string used to build another string,
and thus read-only, is marked const.
In one instance, for consistency the malloc/strcpy sequence to
build the actual query is replaced with the single strdup call used
elsewhere.
In one instance the declaration of a query string is moved to
where it is used.
Change-Id: Iddc0317d446b5bdc099e0045eba4bb1c87062640
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21699
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>