diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-08-03 17:07:40 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-08-03 17:07:40 +0200 |
commit | 2ef29e10f4157b90f0f4b5ce7f3bca551231ce02 (patch) | |
tree | 7f128a0b2705431346c5bf0bcb90d87ae94d46d7 /sys/src/9/pc/archmp.c | |
parent | 1b7e120c090af2f8f0e17a664ba0e5e5d7f261a0 (diff) |
pc, pc64: replace atoi() calls with strtol() when hex can be expcte
Diffstat (limited to 'sys/src/9/pc/archmp.c')
-rw-r--r-- | sys/src/9/pc/archmp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/src/9/pc/archmp.c b/sys/src/9/pc/archmp.c index 723433db8..6e7aa3de9 100644 --- a/sys/src/9/pc/archmp.c +++ b/sys/src/9/pc/archmp.c @@ -261,8 +261,8 @@ mpoverride(uchar** newp, uchar** e) uchar* p; char* s; - size = atoi(getconf("*mp")); - if(size == 0) panic("mpoverride: invalid size in *mp"); + size = strtol(getconf("*mp"), 0, 0); + if(size <= 0) panic("mpoverride: invalid size in *mp"); *newp = p = xalloc(size); if(p == nil) panic("mpoverride: can't allocate memory"); *e = p + size; |