diff options
author | Andy Lester <andy@petdance.com> | 2020-03-05 22:43:36 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-05 20:43:36 -0800 |
commit | e63117a84ef11083be86db7afb2ac2789491ca09 (patch) | |
tree | 977ce423744f8be0015a7a7e2ab7ca9ecd27f872 /Modules/socketmodule.c | |
parent | da4d656e951b00580d135ae6345656ecedf9d8d4 (diff) | |
download | cpython-git-e63117a84ef11083be86db7afb2ac2789491ca09.tar.gz |
closes bpo-39859: Do not downcast result of hstrerror (GH-18790)
set_herror builds a string by calling hstrerror but downcasts its return value to char *. It should be const char *.
Automerge-Triggered-By: @benjaminp
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r-- | Modules/socketmodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 37b312396f..2818ac7f20 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -658,7 +658,7 @@ set_herror(int h_error) PyObject *v; #ifdef HAVE_HSTRERROR - v = Py_BuildValue("(is)", h_error, (char *)hstrerror(h_error)); + v = Py_BuildValue("(is)", h_error, hstrerror(h_error)); #else v = Py_BuildValue("(is)", h_error, "host not found"); #endif |