From dd53a4cd759bfc20283c87ccf841654796550559 Mon Sep 17 00:00:00 2001 From: Anis Ellouze Date: Mon, 31 Aug 2015 13:41:56 +0100 Subject: [PATCH] fix issue in the get value of devicelog --- dm/dmtree/deviceinfo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dm/dmtree/deviceinfo.c b/dm/dmtree/deviceinfo.c index d9a44a9..d337ba7 100644 --- a/dm/dmtree/deviceinfo.c +++ b/dm/dmtree/deviceinfo.c @@ -140,11 +140,12 @@ int get_device_devicelog (char *refparam, struct dmctx *ctx, char **value) return 0; buff[len] = '\0'; char *p = buff; - while (*p++) { //TODO to optimize, we can avoid this if the '<' and '>' does not cause problem in the tests. + while (*p) { //TODO to optimize, we can avoid this if the '<' and '>' does not cause problem in the tests. if (*p == '<') *p = '('; else if (*p == '>') *p = ')'; + p++; } *value = dmstrdup(buff); // MEM WILL BE FREED IN DMMEMCLEAN return 0;