projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
41c10c5
)
Add some const where appropriate.
author
Guus Sliepen
<guus@tinc-vpn.org>
Thu, 28 May 2009 21:18:22 +0000
(23:18 +0200)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Thu, 28 May 2009 21:18:22 +0000
(23:18 +0200)
lib/utils.c
patch
|
blob
|
history
lib/utils.h
patch
|
blob
|
history
diff --git
a/lib/utils.c
b/lib/utils.c
index
4b93b04
..
56bcb0b
100644
(file)
--- a/
lib/utils.c
+++ b/
lib/utils.c
@@
-29,7
+29,7
@@
volatile char (*cp_file[]) = {"?", "?", "?", "?", "?", "?", "?", "?", "?", "?",
volatile int cp_index = 0;
#endif
volatile int cp_index = 0;
#endif
-c
har *hexadecimals
= "0123456789ABCDEF";
+c
onst char hexadecimals[]
= "0123456789ABCDEF";
int charhex2bin(char c)
{
int charhex2bin(char c)
{
@@
-85,7
+85,7
@@
void cp_trace()
#include <w32api/windows.h>
#endif
#include <w32api/windows.h>
#endif
-char *winerror(int err) {
+c
onst c
har *winerror(int err) {
static char buf[1024], *newline;
if (!FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
static char buf[1024], *newline;
if (!FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
diff --git
a/lib/utils.h
b/lib/utils.h
index
6ff2082
..
04c4ddb
100644
(file)
--- a/
lib/utils.h
+++ b/
lib/utils.h
@@
-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 void bin2hex(char *src, char *dst, int length);
#ifdef HAVE_MINGW
-extern char *winerror(int);
+extern c
onst c
har *winerror(int);
#define strerror(x) ((x)>0?strerror(x):winerror(GetLastError()))
#endif
#define strerror(x) ((x)>0?strerror(x):winerror(GetLastError()))
#endif