Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[tcpcrypt-dev] [PATCH] avoid warnings about unused fixed strings

Daniel Kahn Gillmor dkg at fifthhorseman.net
Tue Jul 22 20:06:08 PDT 2014


---
 user/src/tcpcrypt_strings.h | 17 +++++++++++++++++
 user/src/tcpcryptd.c        |  1 +
 user/src/tcpcryptd.h        | 13 -------------
 user/util/tcs.c             |  1 +
 4 files changed, 19 insertions(+), 13 deletions(-)
 create mode 100644 user/src/tcpcrypt_strings.h

diff --git a/user/src/tcpcrypt_strings.h b/user/src/tcpcrypt_strings.h
new file mode 100644
index 0000000..92613f6
--- /dev/null
+++ b/user/src/tcpcrypt_strings.h
@@ -0,0 +1,17 @@
+#ifndef __TCPCRYPT_TCPCRYPT_STRINGS_H__
+#define __TCPCRYPT_TCPCRYPT_STRINGS_H__
+
+static char *REQS[] = {
+	"GET /check HTTP/1.0\r\n"
+        "Host: check.tcpcrypt.org\r\n"
+        "\r\n",
+
+	"MORTEasldkfjasldkfjaslkfjaslfkjasdlfkjas",
+
+	"GHGHHGHGHGHREHEHGEHRGHERHGHERG",
+};
+
+static char *TEST_REPLY = "HTTP/1.0 200 OK\r\n"
+			  "\r\n";
+
+#endif /* __TCPCRYPT_TCPCRYPT_STRINGS_H__ */
diff --git a/user/src/tcpcryptd.c b/user/src/tcpcryptd.c
index 60b69ad..8e1ecfb 100644
--- a/user/src/tcpcryptd.c
+++ b/user/src/tcpcryptd.c
@@ -22,6 +22,7 @@
 #include "profile.h"
 #include "test.h"
 #include "crypto.h"
+#include "tcpcrypt_strings.h"
 
 #define ARRAY_SIZE(n)	(sizeof(n) / sizeof(*n))
 #define MAX_TIMERS 1024
diff --git a/user/src/tcpcryptd.h b/user/src/tcpcryptd.h
index eb0eebd..058c89f 100644
--- a/user/src/tcpcryptd.h
+++ b/user/src/tcpcryptd.h
@@ -31,19 +31,6 @@ enum {
         TEST_ERR_NO_CRYPT		= 670,
 };
 
-static char *REQS[] = {
-	"GET /check HTTP/1.0\r\n"
-        "Host: check.tcpcrypt.org\r\n"
-        "\r\n",
-
-	"MORTEasldkfjasldkfjaslkfjaslfkjasdlfkjas",
-
-	"GHGHHGHGHGHREHEHGEHRGHERHGHERG",
-};
-
-static char *TEST_REPLY = "HTTP/1.0 200 OK\r\n"
-			  "\r\n";
-
 struct params {
 	char	*p_params[MAX_PARAM];
 	int	p_paramc;
diff --git a/user/util/tcs.c b/user/util/tcs.c
index 2a33e74..b622f26 100644
--- a/user/util/tcs.c
+++ b/user/util/tcs.c
@@ -9,6 +9,7 @@
 #include "src/tcpcryptd.h"
 #include "src/tcpcrypt.h"
 #include "src/tcpcrypt_ctl.h"
+#include "src/tcpcrypt_strings.h"
 
 static char *_bind_ip = "0.0.0.0";
 
-- 
2.0.1



More information about the tcpcrypt-dev mailing list