Add some const where appropriate.
authorGuus Sliepen <guus@tinc-vpn.org>
Thu, 28 May 2009 21:18:22 +0000 (23:18 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Thu, 28 May 2009 21:18:22 +0000 (23:18 +0200)
lib/utils.c
lib/utils.h

index 4b93b042adccff13525e53e59019dd12621190fd..56bcb0b1b35d8687be63c346ce2690e69063aff4 100644 (file)
@@ -29,7 +29,7 @@ volatile char (*cp_file[]) = {"?", "?", "?", "?", "?", "?", "?", "?", "?", "?",
 volatile int cp_index = 0;
 #endif
 
-char *hexadecimals = "0123456789ABCDEF";
+const char hexadecimals[] = "0123456789ABCDEF";
 
 int charhex2bin(char c)
 {
@@ -85,7 +85,7 @@ void cp_trace()
 #include <w32api/windows.h>
 #endif
 
-char *winerror(int err) {
+const char *winerror(int err) {
        static char buf[1024], *newline;
 
        if (!FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
index 6ff20829bb3aca7ee7e93aaa45d8c7cab4526d50..04c4ddbd3aeb6c8f94087594a99baf9ba7240fc1 100644 (file)
@@ -39,7 +39,7 @@ extern void hex2bin(char *src, char *dst, int length);
 extern void bin2hex(char *src, char *dst, int length);
 
 #ifdef HAVE_MINGW
-extern char *winerror(int);
+extern const char *winerror(int);
 #define strerror(x) ((x)>0?strerror(x):winerror(GetLastError()))
 #endif