mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 05:54:08 +00:00
os: Xtranssock: fix printf format warning
> ../os/Xtranssock.c: In function '_XSERVTransSocketReopen':
> ../os/Xtranssock.c:449:49: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' {aka 'long unsigned int'} [-Wformat=]
> prmsg (1, "SocketReopen: invalid portlen %d\n", portlen);
> ~^ ~~~~~~~
> %ld
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
19f015d8e6
commit
df0f1cc687
@@ -446,13 +446,13 @@ static XtransConnInfo _XSERVTransSocketReopen (
|
||||
size_t portlen = portnamelen;
|
||||
#ifdef SOCK_MAXADDRLEN
|
||||
if (portlen > (SOCK_MAXADDRLEN + 2)) {
|
||||
prmsg (1, "SocketReopen: invalid portlen %d\n", portlen);
|
||||
prmsg (1, "SocketReopen: invalid portlen %llu\n", (unsigned long long)portlen);
|
||||
return NULL;
|
||||
}
|
||||
if (portlen < 14) portlen = 14;
|
||||
#else
|
||||
if (portlen > 14) {
|
||||
prmsg (1, "SocketReopen: invalid portlen %ld\n", (unsigned long)portlen);
|
||||
prmsg (1, "SocketReopen: invalid portlen %llu\n", (unsigned long long)portlen);
|
||||
return NULL;
|
||||
}
|
||||
#endif /*SOCK_MAXADDRLEN*/
|
||||
|
||||
Reference in New Issue
Block a user