]> granicus.if.org Git - python/commitdiff
Use abort() rather than exit() to appease tools like rpmlint. abort() is used
authorStefan Krah <skrah@bytereef.org>
Fri, 30 Mar 2012 12:12:20 +0000 (14:12 +0200)
committerStefan Krah <skrah@bytereef.org>
Fri, 30 Mar 2012 12:12:20 +0000 (14:12 +0200)
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.

Modules/_decimal/libmpdec/mpdecimal.h

index 01fb59ec0b8e61b8874fc407e4b5271f31b5e561..f3f32ac6017aefaba83aad46ab6826ad2bc48177 100644 (file)
@@ -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__); \