summaryrefslogtreecommitdiffstats
path: root/Modules/_decimal
diff options
context:
space:
mode:
authorStefan Krah <skrah@bytereef.org>2012-03-30 12:12:20 (GMT)
committerStefan Krah <skrah@bytereef.org>2012-03-30 12:12:20 (GMT)
commit0e41981cd512b9735fb0ff63a82d2d5264aff5be (patch)
treeb8e9b20b700485b1718f890560a90bf7f1c541e2 /Modules/_decimal
parentad95c2d25c5fe5c4c88b73de2c60722ba56572e9 (diff)
downloadcpython-0e41981cd512b9735fb0ff63a82d2d5264aff5be.zip
cpython-0e41981cd512b9735fb0ff63a82d2d5264aff5be.tar.gz
cpython-0e41981cd512b9735fb0ff63a82d2d5264aff5be.tar.bz2
Use abort() rather than exit() to appease tools like rpmlint. abort() is used
in libmpdec to prevent undefined behavior if an invalid context is used. This cannot occur for the _decimal module since user input for the context is validated.
Diffstat (limited to 'Modules/_decimal')
-rw-r--r--Modules/_decimal/libmpdec/mpdecimal.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_decimal/libmpdec/mpdecimal.h b/Modules/_decimal/libmpdec/mpdecimal.h
index 01fb59e..f3f32ac 100644
--- a/Modules/_decimal/libmpdec/mpdecimal.h
+++ b/Modules/_decimal/libmpdec/mpdecimal.h
@@ -751,7 +751,7 @@ EXTINLINE void mpd_copy_flags(mpd_t *result, const mpd_t *a);
#define mpd_err_fatal(...) \
do {fprintf(stderr, "%s:%d: error: ", __FILE__, __LINE__); \
fprintf(stderr, __VA_ARGS__); fputc('\n', stderr); \
- exit(1); \
+ abort(); \
} while (0)
#define mpd_err_warn(...) \
do {fprintf(stderr, "%s:%d: warning: ", __FILE__, __LINE__); \