diff options
-rw-r--r-- | Xtrans.c | 7 | ||||
-rw-r--r-- | Xtrans.h | 2 | ||||
-rw-r--r-- | Xtransint.h | 4 | ||||
-rw-r--r-- | Xtranslcl.c | 8 | ||||
-rw-r--r-- | Xtranssock.c | 10 | ||||
-rw-r--r-- | Xtransutil.c | 2 |
6 files changed, 17 insertions, 16 deletions
@@ -150,7 +150,7 @@ TRANS(FreeConnInfo) (XtransConnInfo ciptr) #define PROTOBUFSIZE 20 static Xtransport * -TRANS(SelectTransport) (char *protocol) +TRANS(SelectTransport) (const char *protocol) { char protobuf[PROTOBUFSIZE]; @@ -203,7 +203,8 @@ TRANS(ParseAddress) (char *address, char **protocol, char **host, char **port) */ char *mybuf, *tmpptr; - char *_protocol, *_host, *_port; + const char *_protocol; + char *_host, *_port; char hostnamebuf[256]; int _host_len; @@ -759,7 +760,7 @@ TRANS(CreateListener) (XtransConnInfo ciptr, char *port, unsigned int flags) } int -TRANS(NoListen) (char * protocol) +TRANS(NoListen) (const char * protocol) { Xtransport *trans; @@ -304,7 +304,7 @@ int TRANS(CreateListener)( ); int TRANS(NoListen) ( - char* /* protocol*/ + const char* /* protocol*/ ); int TRANS(ResetListener)( diff --git a/Xtransint.h b/Xtransint.h index 1052777..3bce8dc 100644 --- a/Xtransint.h +++ b/Xtransint.h @@ -144,7 +144,7 @@ struct _XtransConnInfo { typedef struct _Xtransport { - char *TransName; + const char *TransName; int flags; #ifdef TRANS_CLIENT @@ -159,7 +159,7 @@ typedef struct _Xtransport { #endif /* TRANS_CLIENT */ #ifdef TRANS_SERVER - char ** nolisten; + const char ** nolisten; XtransConnInfo (*OpenCOTSServer)( struct _Xtransport *, /* transport */ char *, /* protocol */ diff --git a/Xtranslcl.c b/Xtranslcl.c index 7acc907..e5b3833 100644 --- a/Xtranslcl.c +++ b/Xtranslcl.c @@ -1382,7 +1382,7 @@ TRANS(SCOReopenServer)(XtransConnInfo ciptr, int fd, char *port) */ typedef struct _LOCALtrans2dev { - char *transname; + const char *transname; #ifdef TRANS_CLIENT @@ -1643,7 +1643,7 @@ static LOCALtrans2dev LOCALtrans2devtab[] = { #define NUMTRANSPORTS (sizeof(LOCALtrans2devtab)/sizeof(LOCALtrans2dev)) -static char *XLOCAL=NULL; +static const char *XLOCAL=NULL; static char *workingXLOCAL=NULL; static char *freeXLOCAL=NULL; @@ -1658,7 +1658,7 @@ static char *freeXLOCAL=NULL; #endif static void -TRANS(LocalInitTransports)(char *protocol) +TRANS(LocalInitTransports)(const char *protocol) { prmsg(3,"LocalInitTransports(%s)\n", protocol); @@ -2318,7 +2318,7 @@ TRANS(LocalCloseForCloning)(XtransConnInfo ciptr) */ #ifdef TRANS_SERVER -static char * local_aliases[] = { +static const char * local_aliases[] = { # ifdef LOCAL_TRANS_PTS "pts", # endif diff --git a/Xtranssock.c b/Xtranssock.c index 775a7f9..1275196 100644 --- a/Xtranssock.c +++ b/Xtranssock.c @@ -172,7 +172,7 @@ from the copyright holders. */ typedef struct _Sockettrans2dev { - char *transname; + const char *transname; int family; int devcotsname; int devcltsname; @@ -254,7 +254,7 @@ static int TRANS(SocketINETClose) (XtransConnInfo ciptr); */ static int -TRANS(SocketSelectFamily) (int first, char *family) +TRANS(SocketSelectFamily) (int first, const char *family) { int i; @@ -538,8 +538,8 @@ TRANS(SocketReopen) (int i _X_UNUSED, int type, int fd, char *port) #ifdef TRANS_CLIENT static XtransConnInfo -TRANS(SocketOpenCOTSClientBase) (char *transname, char *protocol, - char *host, char *port, int previndex) +TRANS(SocketOpenCOTSClientBase) (const char *transname, const char *protocol, + const char *host, const char *port, int previndex) { XtransConnInfo ciptr; int i = previndex; @@ -2248,7 +2248,7 @@ TRANS(SocketUNIXCloseForCloning) (XtransConnInfo ciptr) #ifdef TCPCONN # ifdef TRANS_SERVER -static char* tcp_nolisten[] = { +static const char* tcp_nolisten[] = { "inet", #if defined(IPv6) && defined(AF_INET6) "inet6", diff --git a/Xtransutil.c b/Xtransutil.c index bf52b37..5dd2453 100644 --- a/Xtransutil.c +++ b/Xtransutil.c @@ -242,7 +242,7 @@ TRANS(GetMyNetworkId) (XtransConnInfo ciptr) char *addr = ciptr->addr; char hostnamebuf[256]; char *networkId = NULL; - char *transName = ciptr->transptr->TransName; + const char *transName = ciptr->transptr->TransName; if (gethostname (hostnamebuf, sizeof (hostnamebuf)) < 0) { |