commit | 12e63680bb2808ffd7038cd14c9959dd96cdb546 | [log] [tgz] |
---|---|---|
author | Baili Deng <bailideng@google.com> | Thu Jan 18 11:14:55 2024 |
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Feb 02 05:58:51 2024 |
tree | 902edb18755db44fa696b27721effc9b7fbe8dd7 | |
parent | a66bcd7c1d2249a576394a7339957966fbf57b32 [diff] |
Replace atoi usage with strtol When using atoi to convert from string to int, we can not tell when there is error. Use strtol to properly handle the errors. BUG=b:320231979 TEST=Unit tests Change-Id: I0e008f2eddaeb601593ad4e91c8d1fa7beab0cd9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/adhd/+/5211625 Commit-Queue: Baili Deng <bailideng@google.com> Reviewed-by: Li-Yu Yu <aaronyu@google.com> Tested-by: chromeos-cop-builder@chromeos-cop.iam.gserviceaccount.com <chromeos-cop-builder@chromeos-cop.iam.gserviceaccount.com>