projects
/
apps
/
core
/
preloaded
/
indicator-win.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
95d657c
)
modules/clock: Not thread safe function replaced.
20/65820/1
author
Radoslaw Czerski
<r.czerski@samsung.com>
Tue, 12 Apr 2016 13:31:37 +0000
(15:31 +0200)
committer
Radoslaw Czerski
<r.czerski@samsung.com>
Tue, 12 Apr 2016 13:31:37 +0000
(15:31 +0200)
strtok -> strtok_r
Change-Id: Ifcb6e8771d9a3270f68d408bf5b5bf63ed396dba
Signed-off-by: Radoslaw Czerski <r.czerski@samsung.com>
src/modules/clock/clock.c
patch
|
blob
|
history
diff --git
a/src/modules/clock/clock.c
b/src/modules/clock/clock.c
index
0c5af00
..
d8c1472
100644
(file)
--- a/
src/modules/clock/clock.c
+++ b/
src/modules/clock/clock.c
@@
-585,10
+585,11
@@
void indicator_get_time_by_region(char* output,void *data)
}
char a_best_pattern[64] = {0,};
+ char *save_ptr;
i18n_ustring_copy_au(a_best_pattern, u_best_pattern);
- char *a_best_pattern_fixed = strtok
(a_best_pattern, "a"
);
- a_best_pattern_fixed = strtok
(a_best_pattern_fixed, " "
);
+ char *a_best_pattern_fixed = strtok
_r(a_best_pattern, "a", &save_ptr
);
+ a_best_pattern_fixed = strtok
_r(a_best_pattern_fixed, " ", &save_ptr
);
if (a_best_pattern_fixed) {
i18n_ustring_copy_ua(u_best_pattern, a_best_pattern_fixed);
}