projects
/
profile
/
mobile
/
apps
/
native
/
settings.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
31c5f4c
)
[UI] Fix displayed available/total storage capacity
35/102735/3
author
Witold Goralski
<w.goralski@samsung.com>
Tue, 6 Dec 2016 10:45:56 +0000
(11:45 +0100)
committer
Radek Kintop
<r.kintop@samsung.com>
Tue, 6 Dec 2016 14:11:56 +0000
(15:11 +0100)
Change-Id: Ieab230e7c76a76bc3d70695d35008b41a252292d
Signed-off-by: Witold Goralski <w.goralski@samsung.com>
setting-about/src/setting-about-status.c
patch
|
blob
|
history
diff --git
a/setting-about/src/setting-about-status.c
b/setting-about/src/setting-about-status.c
index 977a65179ce68da36fa4135bf5ec670963610948..7e05099f4873e03ade7b80a1ff19d88a05a65a4c 100755
(executable)
--- a/
setting-about/src/setting-about-status.c
+++ b/
setting-about/src/setting-about-status.c
@@
-476,6
+476,12
@@
static void __get_storage_capacity(char *str, int size)
total, avail);
}
+ /* check if values are appropriate*/
+ if (total < 0 || avail < 0 || total < avail) {
+ SETTING_TRACE_ERROR("Fail to get internal memory size");
+ snprintf(str, size, "%s", _("IDS_ST_HEADER_UNAVAILABLE"));
+ return;
+ }
snprintf(str, size, "%0.1fGB available (Total %0.1fGB)",
(double)(avail / 1000000000.0), (double)(total / 1000000000.0));
}