mirror of
https://github.com/SwallowOS/xorg_lib_libxtrans
synced 2025-11-04 05:46:13 +08:00
Add const qualifiers to TRANS(CreateListener) port args
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
2
Xtrans.c
2
Xtrans.c
@@ -743,7 +743,7 @@ TRANS(SetOption) (XtransConnInfo ciptr, int option, int arg)
|
||||
#ifdef TRANS_SERVER
|
||||
|
||||
int
|
||||
TRANS(CreateListener) (XtransConnInfo ciptr, char *port, unsigned int flags)
|
||||
TRANS(CreateListener) (XtransConnInfo ciptr, const char *port, unsigned int flags)
|
||||
|
||||
{
|
||||
return ciptr->transptr->CreateListener (ciptr, port, flags);
|
||||
|
||||
2
Xtrans.h
2
Xtrans.h
@@ -299,7 +299,7 @@ int TRANS(SetOption)(
|
||||
|
||||
int TRANS(CreateListener)(
|
||||
XtransConnInfo, /* ciptr */
|
||||
char *, /* port */
|
||||
const char *, /* port */
|
||||
unsigned int /* flags */
|
||||
);
|
||||
|
||||
|
||||
@@ -233,7 +233,7 @@ typedef struct _Xtransport {
|
||||
|
||||
int (*CreateListener)(
|
||||
XtransConnInfo, /* connection */
|
||||
char *, /* port */
|
||||
const char *, /* port */
|
||||
unsigned int /* flags */
|
||||
);
|
||||
|
||||
|
||||
@@ -2151,7 +2151,8 @@ TRANS(LocalSetOption)(XtransConnInfo ciptr, int option, int arg)
|
||||
#ifdef TRANS_SERVER
|
||||
|
||||
static int
|
||||
TRANS(LocalCreateListener)(XtransConnInfo ciptr, char *port, unsigned int flags _X_UNUSED)
|
||||
TRANS(LocalCreateListener)(XtransConnInfo ciptr, const char *port,
|
||||
unsigned int flags _X_UNUSED)
|
||||
|
||||
{
|
||||
prmsg(2,"LocalCreateListener(%p->%d,%s)\n",ciptr,ciptr->fd,port);
|
||||
|
||||
@@ -947,7 +947,8 @@ TRANS(SocketCreateListener) (XtransConnInfo ciptr,
|
||||
|
||||
#ifdef TCPCONN
|
||||
static int
|
||||
TRANS(SocketINETCreateListener) (XtransConnInfo ciptr, char *port, unsigned int flags)
|
||||
TRANS(SocketINETCreateListener) (XtransConnInfo ciptr, const char *port,
|
||||
unsigned int flags)
|
||||
|
||||
{
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
@@ -1075,7 +1076,7 @@ TRANS(SocketINETCreateListener) (XtransConnInfo ciptr, char *port, unsigned int
|
||||
#ifdef UNIXCONN
|
||||
|
||||
static int
|
||||
TRANS(SocketUNIXCreateListener) (XtransConnInfo ciptr, char *port,
|
||||
TRANS(SocketUNIXCreateListener) (XtransConnInfo ciptr, const char *port,
|
||||
unsigned int flags)
|
||||
|
||||
{
|
||||
|
||||
@@ -226,8 +226,8 @@ typedef struct _Xtransport {
|
||||
|
||||
int (*CreateListener)(
|
||||
XtransConnInfo, /* connection */
|
||||
char *, /* port */
|
||||
int /* flags */
|
||||
const char *, /* port */
|
||||
int /* flags */
|
||||
);
|
||||
|
||||
int (*ResetListener)(
|
||||
@@ -480,7 +480,7 @@ Based on current usage, the complimentary function
|
||||
<funcprototype>
|
||||
<funcdef>int <function>TRANS(CreateListener)</function></funcdef>
|
||||
<paramdef>XtransConnInfo <parameter>connection</parameter></paramdef>
|
||||
<paramdef>char *<parameter>port</parameter></paramdef>
|
||||
<paramdef>const char *<parameter>port</parameter></paramdef>
|
||||
<paramdef>int <parameter>flags</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
@@ -935,7 +935,7 @@ different transport type is added, or a transport dependent option is defined.
|
||||
<funcprototype>
|
||||
<funcdef>int <function>CreateListener</function></funcdef>
|
||||
<paramdef>struct _Xtransport *<parameter>thistrans</parameter></paramdef>
|
||||
<paramdef>char <parameter>*port</parameter></paramdef>
|
||||
<paramdef>const char <parameter>*port</parameter></paramdef>
|
||||
<paramdef>int <parameter>flags</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
|
||||
Reference in New Issue
Block a user