projects
/
platform
/
upstream
/
elementary.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa1964d
)
label: Remove unused setting of foundflag before return.
author
Stefan Schmidt
<s.schmidt@samsung.com>
Fri, 28 Mar 2014 14:46:12 +0000
(15:46 +0100)
committer
Stefan Schmidt
<s.schmidt@samsung.com>
Fri, 28 Mar 2014 14:47:53 +0000
(15:47 +0100)
We are never going to check on foundflag here because we return
right after setting it. Clear the code up a bit by not setting it
at all.
Found by Clang scan-build
src/lib/elm_label.c
patch
|
blob
|
history
diff --git
a/src/lib/elm_label.c
b/src/lib/elm_label.c
index 3ad10ed866cbe417062350d3d9dc1290b1adfdc4..071ccaa96e3cfa774092755d192a7891467850f3 100644
(file)
--- a/
src/lib/elm_label.c
+++ b/
src/lib/elm_label.c
@@
-232,10
+232,8
@@
_get_value_in_key_string(const char *oldstring, const char *key, char **value)
int key_len = strlen(key);
endtag = curlocater + key_len;
if ((!endtag) || (*endtag != '='))
- {
- foundflag = 0;
return -1;
- }
+
firstindex = abs(oldstring - curlocater);
firstindex += key_len + 1; // strlen("key") + strlen("=")
*value = (char *)oldstring + firstindex;