cpu: change strtol() to strtoull() 03/55903/1 accepted/tizen/mobile/20151230.223708 accepted/tizen/tv/20151230.223729 accepted/tizen/wearable/20151230.223743 submit/tizen/20151230.082645
authorTaeyoung Kim <ty317.kim@samsung.com>
Wed, 30 Dec 2015 05:33:29 +0000 (14:33 +0900)
committerTaeyoung Kim <ty317.kim@samsung.com>
Wed, 30 Dec 2015 05:38:00 +0000 (14:38 +0900)
- The type of the variables to store the result is unsigned longlong
  Thus strtol() is changed to strtoull()

Change-Id: I3b01e79b46e7bf3b807e48a1ff1992481e67372d
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
src/cpu.c

index ef4becc..4077db9 100644 (file)
--- a/src/cpu.c
+++ b/src/cpu.c
@@ -74,13 +74,13 @@ static int _get_systime(device_system_time_s *st)
                return -1;
 
        s++;
-       st->user = strtol(s, &s, 10);
-       st->nice = strtol(s, &s, 10);
-       st->system = strtol(s, &s, 10);
-       st->idle = strtol(s, &s, 10);
-       st->iowait = strtol(s, &s, 10);
-       st->irq = strtol(s, &s, 10);
-       st->softirq = strtol(s, &s, 10);
+       st->user = strtoull(s, &s, 10);
+       st->nice = strtoull(s, &s, 10);
+       st->system = strtoull(s, &s, 10);
+       st->idle = strtoull(s, &s, 10);
+       st->iowait = strtoull(s, &s, 10);
+       st->irq = strtoull(s, &s, 10);
+       st->softirq = strtoull(s, &s, 10);
 
        return 0;
 }