summaryrefslogtreecommitdiff
path: root/src/bin/eldbus/utils.c
diff options
context:
space:
mode:
authorJosé Roberto de Souza <jose.souza@intel.com>2013-07-08 13:42:18 -0300
committerJosé Roberto de Souza <jose.souza@intel.com>2013-07-08 13:52:12 -0300
commit9b9002e7e379dc4440ac7544bd2c177c9cf16041 (patch)
treec98a21d96dc44ecef14102f59d606153ba8dfb3c /src/bin/eldbus/utils.c
parent353de508988a5c4bb36b970f52cf9b67fce5decb (diff)
eldbus-codegen: If substr dont exist in string return string.
CID: 1039339
Diffstat (limited to '')
-rw-r--r--src/bin/eldbus/utils.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bin/eldbus/utils.c b/src/bin/eldbus/utils.c
index a020445e1d..de4eb1502d 100644
--- a/src/bin/eldbus/utils.c
+++ b/src/bin/eldbus/utils.c
@@ -87,6 +87,11 @@ replace_string(const char *string, const char *substr, const char *replacement)
87 Eina_Strbuf *buffer = eina_strbuf_new(); 87 Eina_Strbuf *buffer = eina_strbuf_new();
88 88
89 pch = strtok(str_cpy, substr); 89 pch = strtok(str_cpy, substr);
90 if (!pch)
91 {
92 eina_strbuf_free(buffer);
93 return str_cpy;
94 }
90 eina_strbuf_append(buffer, pch); 95 eina_strbuf_append(buffer, pch);
91 96
92 while ((pch = strtok(NULL, substr))) 97 while ((pch = strtok(NULL, substr)))