Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8c15976

Browse files
committed
Issue #10951: Fix warnings in the socket module.
1 parent 8a56085 commit 8c15976

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Modules/socketmodule.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4263,7 +4263,7 @@ socket_gethostbyname_ex(PyObject *self, PyObject *args)
42634263
int buf_len = (sizeof buf) - 1;
42644264
int errnop;
42654265
#endif
4266-
#if defined(HAVE_GETHOSTBYNAME_R_3_ARG) || defined(HAVE_GETHOSTBYNAME_R_6_ARG)
4266+
#ifdef HAVE_GETHOSTBYNAME_R_3_ARG
42674267
int result;
42684268
#endif
42694269
#endif /* HAVE_GETHOSTBYNAME_R */
@@ -4275,7 +4275,7 @@ socket_gethostbyname_ex(PyObject *self, PyObject *args)
42754275
Py_BEGIN_ALLOW_THREADS
42764276
#ifdef HAVE_GETHOSTBYNAME_R
42774277
#if defined(HAVE_GETHOSTBYNAME_R_6_ARG)
4278-
result = gethostbyname_r(name, &hp_allocated, buf, buf_len,
4278+
gethostbyname_r(name, &hp_allocated, buf, buf_len,
42794279
&h, &errnop);
42804280
#elif defined(HAVE_GETHOSTBYNAME_R_5_ARG)
42814281
h = gethostbyname_r(name, &hp_allocated, buf, buf_len, &errnop);
@@ -4337,7 +4337,7 @@ socket_gethostbyaddr(PyObject *self, PyObject *args)
43374337
int buf_len = (sizeof buf) - 1;
43384338
int errnop;
43394339
#endif
4340-
#if defined(HAVE_GETHOSTBYNAME_R_3_ARG) || defined(HAVE_GETHOSTBYNAME_R_6_ARG)
4340+
#ifdef HAVE_GETHOSTBYNAME_R_3_ARG
43414341
int result;
43424342
#endif
43434343
#endif /* HAVE_GETHOSTBYNAME_R */
@@ -4371,7 +4371,7 @@ socket_gethostbyaddr(PyObject *self, PyObject *args)
43714371
Py_BEGIN_ALLOW_THREADS
43724372
#ifdef HAVE_GETHOSTBYNAME_R
43734373
#if defined(HAVE_GETHOSTBYNAME_R_6_ARG)
4374-
result = gethostbyaddr_r(ap, al, af,
4374+
gethostbyaddr_r(ap, al, af,
43754375
&hp_allocated, buf, buf_len,
43764376
&h, &errnop);
43774377
#elif defined(HAVE_GETHOSTBYNAME_R_5_ARG)

0 commit comments

Comments
 (0)