[Python-checkins] cpython: Use abort() rather than exit() to appease tools like rpmlint. abort() is used
stefan.krah
python-checkins at python.org
Fri Mar 30 14:21:01 CEST 2012
http://hg.python.org/cpython/rev/3a83264ebcd6
changeset: 75994:3a83264ebcd6
parent: 75970:e505ce0514ff
user: Stefan Krah <skrah at bytereef.org>
date: Fri Mar 30 14:12:20 2012 +0200
summary:
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.
files:
Modules/_decimal/libmpdec/mpdecimal.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Modules/_decimal/libmpdec/mpdecimal.h b/Modules/_decimal/libmpdec/mpdecimal.h
--- a/Modules/_decimal/libmpdec/mpdecimal.h
+++ b/Modules/_decimal/libmpdec/mpdecimal.h
@@ -751,7 +751,7 @@
#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__); \
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list