Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
1a62a680
Kaydet (Commit)
1a62a680
authored
Agu 17, 2014
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #22218: Fix "comparison between signed and unsigned integers" warnings in
socketmodule.c.
üst
c399e852
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
socketmodule.c
Modules/socketmodule.c
+6
-5
No files found.
Modules/socketmodule.c
Dosyayı görüntüle @
1a62a680
...
...
@@ -1277,7 +1277,7 @@ idna_converter(PyObject *obj, struct maybe_idna *data)
return
0
;
}
return
Py_CLEANUP_SUPPORTED
;
}
}
/* Parse a socket address argument according to the socket object's
address family. Return 1 if the address was in the proper format,
...
...
@@ -1308,12 +1308,13 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
Py_INCREF
(
args
);
if
(
!
PyArg_Parse
(
args
,
"y#"
,
&
path
,
&
len
))
goto
unix_out
;
assert
(
len
>=
0
);
addr
=
(
struct
sockaddr_un
*
)
addr_ret
;
#ifdef linux
if
(
len
>
0
&&
path
[
0
]
==
0
)
{
/* Linux abstract namespace extension */
if
(
len
>
sizeof
addr
->
sun_path
)
{
if
(
(
size_t
)
len
>
sizeof
addr
->
sun_path
)
{
PyErr_SetString
(
PyExc_OSError
,
"AF_UNIX path too long"
);
goto
unix_out
;
...
...
@@ -1323,7 +1324,7 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
#endif
/* linux */
{
/* regular NULL-terminated string */
if
(
len
>=
sizeof
addr
->
sun_path
)
{
if
(
(
size_t
)
len
>=
sizeof
addr
->
sun_path
)
{
PyErr_SetString
(
PyExc_OSError
,
"AF_UNIX path too long"
);
goto
unix_out
;
...
...
@@ -1675,7 +1676,7 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
if
(
len
==
0
)
{
ifr
.
ifr_ifindex
=
0
;
}
else
if
(
len
<
sizeof
(
ifr
.
ifr_name
))
{
}
else
if
(
(
size_t
)
len
<
sizeof
(
ifr
.
ifr_name
))
{
strncpy
(
ifr
.
ifr_name
,
PyBytes_AS_STRING
(
interfaceName
),
sizeof
(
ifr
.
ifr_name
));
ifr
.
ifr_name
[(
sizeof
(
ifr
.
ifr_name
))
-
1
]
=
'\0'
;
if
(
ioctl
(
s
->
sock_fd
,
SIOCGIFINDEX
,
&
ifr
)
<
0
)
{
...
...
@@ -4290,7 +4291,7 @@ Return the IP address (a string of the form '255.255.255.255') for a host.");
/* Convenience function common to gethostbyname_ex and gethostbyaddr */
static
PyObject
*
gethost_common
(
struct
hostent
*
h
,
struct
sockaddr
*
addr
,
in
t
alen
,
int
af
)
gethost_common
(
struct
hostent
*
h
,
struct
sockaddr
*
addr
,
size_
t
alen
,
int
af
)
{
char
**
pch
;
PyObject
*
rtn_tuple
=
(
PyObject
*
)
NULL
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment