summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Krah <skrah@bytereef.org>2012-03-30 14:12:20 +0200
committerStefan Krah <skrah@bytereef.org>2012-03-30 14:12:20 +0200
commit0e41981cd512b9735fb0ff63a82d2d5264aff5be (patch)
treeb8e9b20b700485b1718f890560a90bf7f1c541e2
parentad95c2d25c5fe5c4c88b73de2c60722ba56572e9 (diff)
downloadcpython-git-0e41981cd512b9735fb0ff63a82d2d5264aff5be.tar.gz
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.
-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 01fb59ec0b..f3f32ac601 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__); \