[PATCH:libxtrans 3/7] Add const qualifiers to TRANS(Reopen...) port args

Alan Coopersmith alan.coopersmith at oracle.com
Mon Aug 25 18:21:20 PDT 2014


Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 Xtrans.c     |    6 +++---
 Xtrans.h     |    4 ++--
 Xtransint.h  |    4 ++--
 Xtranslcl.c  |   19 ++++++++++---------
 Xtranssock.c |    6 +++---
 5 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/Xtrans.c b/Xtrans.c
index 6fa5141..79b3b31 100644
--- a/Xtrans.c
+++ b/Xtrans.c
@@ -490,7 +490,7 @@ TRANS(Open) (int type, const char *address)
  */
 
 static XtransConnInfo
-TRANS(Reopen) (int type, int trans_id, int fd, char *port)
+TRANS(Reopen) (int type, int trans_id, int fd, const char *port)
 
 {
     XtransConnInfo	ciptr = NULL;
@@ -616,7 +616,7 @@ TRANS(OpenCLTSServer) (const char *address)
 #ifdef TRANS_REOPEN
 
 XtransConnInfo
-TRANS(ReopenCOTSServer) (int trans_id, int fd, char *port)
+TRANS(ReopenCOTSServer) (int trans_id, int fd, const char *port)
 
 {
     prmsg (2,"ReopenCOTSServer(%d, %d, %s)\n", trans_id, fd, port);
@@ -624,7 +624,7 @@ TRANS(ReopenCOTSServer) (int trans_id, int fd, char *port)
 }
 
 XtransConnInfo
-TRANS(ReopenCLTSServer) (int trans_id, int fd, char *port)
+TRANS(ReopenCLTSServer) (int trans_id, int fd, const char *port)
 
 {
     prmsg (2,"ReopenCLTSServer(%d, %d, %s)\n", trans_id, fd, port);
diff --git a/Xtrans.h b/Xtrans.h
index 1fe0364..b93e587 100644
--- a/Xtrans.h
+++ b/Xtrans.h
@@ -270,13 +270,13 @@ XtransConnInfo TRANS(OpenCLTSServer)(
 XtransConnInfo TRANS(ReopenCOTSServer)(
     int,		/* trans_id */
     int,		/* fd */
-    char *		/* port */
+    const char *	/* port */
 );
 
 XtransConnInfo TRANS(ReopenCLTSServer)(
     int,		/* trans_id */
     int,		/* fd */
-    char *		/* port */
+    const char *	/* port */
 );
 
 int TRANS(GetReopenInfo)(
diff --git a/Xtransint.h b/Xtransint.h
index 4c670b8..5f7718e 100644
--- a/Xtransint.h
+++ b/Xtransint.h
@@ -209,13 +209,13 @@ typedef struct _Xtransport {
     XtransConnInfo (*ReopenCOTSServer)(
 	struct _Xtransport *,	/* transport */
         int,			/* fd */
-        char *			/* port */
+        const char *		/* port */
     );
 
     XtransConnInfo (*ReopenCLTSServer)(
 	struct _Xtransport *,	/* transport */
         int,			/* fd */
-        char *			/* port */
+        const char *		/* port */
     );
 
 #endif /* TRANS_REOPEN */
diff --git a/Xtranslcl.c b/Xtranslcl.c
index 4deb86c..78572b3 100644
--- a/Xtranslcl.c
+++ b/Xtranslcl.c
@@ -132,7 +132,8 @@ TRANS(OpenFail)(XtransConnInfo ciptr _X_UNUSED, char *port _X_UNUSED)
 #ifdef TRANS_REOPEN
 
 static int
-TRANS(ReopenFail)(XtransConnInfo ciptr _X_UNUSED, int fd _X_UNUSED, char *port _X_UNUSED)
+TRANS(ReopenFail)(XtransConnInfo ciptr _X_UNUSED, int fd _X_UNUSED,
+                  const char *port _X_UNUSED)
 
 {
     return 0;
@@ -1276,7 +1277,7 @@ TRANS(SCOAccept)(XtransConnInfo ciptr, XtransConnInfo newciptr, int *status)
 #ifdef LOCAL_TRANS_PTS
 
 static int
-TRANS(PTSReopenServer)(XtransConnInfo ciptr, int fd, char *port)
+TRANS(PTSReopenServer)(XtransConnInfo ciptr, int fd, const char *port)
 
 {
 #ifdef PTSNODENAME
@@ -1317,7 +1318,7 @@ TRANS(PTSReopenServer)(XtransConnInfo ciptr, int fd, char *port)
 #ifdef LOCAL_TRANS_NAMED
 
 static int
-TRANS(NAMEDReopenServer)(XtransConnInfo ciptr, int fd _X_UNUSED, char *port)
+TRANS(NAMEDReopenServer)(XtransConnInfo ciptr, int fd _X_UNUSED, const char *port)
 
 {
 #ifdef NAMEDNODENAME
@@ -1358,7 +1359,7 @@ TRANS(NAMEDReopenServer)(XtransConnInfo ciptr, int fd _X_UNUSED, char *port)
 
 #ifdef LOCAL_TRANS_SCO
 static int
-TRANS(SCOReopenServer)(XtransConnInfo ciptr, int fd, char *port)
+TRANS(SCOReopenServer)(XtransConnInfo ciptr, int fd, const char *port)
 
 {
 #ifdef SCORNODENAME
@@ -1441,13 +1442,13 @@ typedef struct _LOCALtrans2dev {
     int	(*devcotsreopenserver)(
 	XtransConnInfo,
 	int, 	/* fd */
-	char * 	/* port */
+	const char * 	/* port */
 );
 
     int	(*devcltsreopenserver)(
 	XtransConnInfo,
 	int, 	/* fd */
-	char *	/* port */
+	const char *	/* port */
 );
 
 #endif /* TRANS_REOPEN */
@@ -1945,7 +1946,7 @@ TRANS(LocalOpenServer)(int type, char *protocol, char *host _X_UNUSED, char *por
 #ifdef TRANS_REOPEN
 
 static XtransConnInfo
-TRANS(LocalReopenServer)(int type, int index, int fd, char *port)
+TRANS(LocalReopenServer)(int type, int index, int fd, const char *port)
 
 {
     XtransConnInfo ciptr;
@@ -2086,7 +2087,7 @@ TRANS(LocalOpenCLTSServer)(Xtransport *thistrans _X_UNUSED, char *protocol,
 #ifdef TRANS_REOPEN
 
 static XtransConnInfo
-TRANS(LocalReopenCOTSServer)(Xtransport *thistrans, int fd, char *port)
+TRANS(LocalReopenCOTSServer)(Xtransport *thistrans, int fd, const char *port)
 
 {
     int index;
@@ -2110,7 +2111,7 @@ TRANS(LocalReopenCOTSServer)(Xtransport *thistrans, int fd, char *port)
 }
 
 static XtransConnInfo
-TRANS(LocalReopenCLTSServer)(Xtransport *thistrans, int fd, char *port)
+TRANS(LocalReopenCLTSServer)(Xtransport *thistrans, int fd, const char *port)
 
 {
     int index;
diff --git a/Xtranssock.c b/Xtranssock.c
index 6cde146..1b1dd7e 100644
--- a/Xtranssock.c
+++ b/Xtranssock.c
@@ -473,7 +473,7 @@ TRANS(SocketOpen) (int i, int type)
 #ifdef TRANS_REOPEN
 
 static XtransConnInfo
-TRANS(SocketReopen) (int i _X_UNUSED, int type, int fd, char *port)
+TRANS(SocketReopen) (int i _X_UNUSED, int type, int fd, const char *port)
 
 {
     XtransConnInfo	ciptr;
@@ -762,7 +762,7 @@ TRANS(SocketOpenCLTSServer) (Xtransport *thistrans, char *protocol,
 #ifdef TRANS_REOPEN
 
 static XtransConnInfo
-TRANS(SocketReopenCOTSServer) (Xtransport *thistrans, int fd, char *port)
+TRANS(SocketReopenCOTSServer) (Xtransport *thistrans, int fd, const char *port)
 
 {
     XtransConnInfo	ciptr;
@@ -796,7 +796,7 @@ TRANS(SocketReopenCOTSServer) (Xtransport *thistrans, int fd, char *port)
 }
 
 static XtransConnInfo
-TRANS(SocketReopenCLTSServer) (Xtransport *thistrans, int fd, char *port)
+TRANS(SocketReopenCLTSServer) (Xtransport *thistrans, int fd, const char *port)
 
 {
     XtransConnInfo	ciptr;
-- 
1.7.9.2



More information about the xorg-devel mailing list