diff options
author | zwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-06-17 00:31:06 +0000 |
---|---|---|
committer | zwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-06-17 00:31:06 +0000 |
commit | 2d0afa36a8fc2ccbfc72e6ea5073b4cd51503c37 (patch) | |
tree | 17125f947fb02661cf292f3a476266c3e37b5822 /src | |
parent | c0f4495d5e9736d77cb5142a6f5112764b5ca3d2 (diff) | |
download | openocd+libswd-2d0afa36a8fc2ccbfc72e6ea5073b4cd51503c37.tar.gz openocd+libswd-2d0afa36a8fc2ccbfc72e6ea5073b4cd51503c37.tar.bz2 openocd+libswd-2d0afa36a8fc2ccbfc72e6ea5073b4cd51503c37.tar.xz openocd+libswd-2d0afa36a8fc2ccbfc72e6ea5073b4cd51503c37.zip |
Ensure range errors are reported only when errno indicates one occurred.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2260 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src')
-rw-r--r-- | src/helper/command.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/helper/command.c b/src/helper/command.c index 5dbc047e..bea480cc 100644 --- a/src/helper/command.c +++ b/src/helper/command.c @@ -872,9 +872,9 @@ long jim_global_long(const char *variable) *ul = func(str, &end, 0); \ if (*end) \ return ERROR_COMMAND_ARGUMENT_INVALID; \ - if (*ul == max) \ + if ((max == *ul) && (ERANGE == errno)) \ return ERROR_COMMAND_ARGUMENT_OVERFLOW; \ - if (min && min == *ul) \ + if (min && (min == *ul) && (ERANGE == errno)) \ return ERROR_COMMAND_ARGUMENT_UNDERFLOW; \ return ERROR_OK; \ } |