Skip to content

Commit 807a6a1

Browse files
committed
clean it up a little bit
1 parent e859961 commit 807a6a1

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

Modules/socketmodule.c

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6200,7 +6200,6 @@ socket_gethostbyname_ex(PyObject *self, PyObject *args)
62006200
#else
62016201
char buf[16384];
62026202
int buf_len = (sizeof buf) - 1;
6203-
int errnop;
62046203
#endif
62056204
#ifdef HAVE_GETHOSTBYNAME_R_3_ARG
62066205
int result;
@@ -6219,11 +6218,9 @@ socket_gethostbyname_ex(PyObject *self, PyObject *args)
62196218
Py_BEGIN_ALLOW_THREADS
62206219
#ifdef HAVE_GETHOSTBYNAME_R
62216220
#if defined(HAVE_GETHOSTBYNAME_R_6_ARG)
6222-
gethostbyname_r(name, &hp_allocated, buf, buf_len, &h, &errnop);
6223-
h_error = errnop;
6221+
gethostbyname_r(name, &hp_allocated, buf, buf_len, &h, &h_error);
62246222
#elif defined(HAVE_GETHOSTBYNAME_R_5_ARG)
6225-
h = gethostbyname_r(name, &hp_allocated, buf, buf_len, &errnop);
6226-
h_error = errnop;
6223+
h = gethostbyname_r(name, &hp_allocated, buf, buf_len, &h_error);
62276224
#else /* HAVE_GETHOSTBYNAME_R_3_ARG */
62286225
memset((void *) &data, '\0', sizeof(data));
62296226
result = gethostbyname_r(name, &hp_allocated, &data);
@@ -6286,7 +6283,6 @@ socket_gethostbyaddr(PyObject *self, PyObject *args)
62866283
to maintain this alignment. */
62876284
_Py_ALIGNED_DEF(8, char) buf[16384];
62886285
int buf_len = (sizeof buf) - 1;
6289-
int errnop;
62906286
#endif
62916287
#ifdef HAVE_GETHOSTBYNAME_R_3_ARG
62926288
int result;
@@ -6328,11 +6324,9 @@ socket_gethostbyaddr(PyObject *self, PyObject *args)
63286324
Py_BEGIN_ALLOW_THREADS
63296325
#ifdef HAVE_GETHOSTBYNAME_R
63306326
#if defined(HAVE_GETHOSTBYNAME_R_6_ARG)
6331-
gethostbyaddr_r(ap, al, af, &hp_allocated, buf, buf_len, &h, &errnop);
6332-
h_error = errnop;
6327+
gethostbyaddr_r(ap, al, af, &hp_allocated, buf, buf_len, &h, &h_error);
63336328
#elif defined(HAVE_GETHOSTBYNAME_R_5_ARG)
6334-
h = gethostbyaddr_r(ap, al, af, &hp_allocated, buf, buf_len, &errnop);
6335-
h_error = errnop;
6329+
h = gethostbyaddr_r(ap, al, af, &hp_allocated, buf, buf_len, &h_error);
63366330
#else /* HAVE_GETHOSTBYNAME_R_3_ARG */
63376331
memset((void *) &data, '\0', sizeof(data));
63386332
result = gethostbyaddr_r(ap, al, af, &hp_allocated, &data);

0 commit comments

Comments
 (0)