Add some const where appropriate.
This commit is contained in:
parent
41c10c5a96
commit
a5fb0d8c6c
2 changed files with 3 additions and 3 deletions
|
@ -29,7 +29,7 @@ volatile char (*cp_file[]) = {"?", "?", "?", "?", "?", "?", "?", "?", "?", "?",
|
||||||
volatile int cp_index = 0;
|
volatile int cp_index = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char *hexadecimals = "0123456789ABCDEF";
|
const char hexadecimals[] = "0123456789ABCDEF";
|
||||||
|
|
||||||
int charhex2bin(char c)
|
int charhex2bin(char c)
|
||||||
{
|
{
|
||||||
|
@ -85,7 +85,7 @@ void cp_trace()
|
||||||
#include <w32api/windows.h>
|
#include <w32api/windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char *winerror(int err) {
|
const char *winerror(int err) {
|
||||||
static char buf[1024], *newline;
|
static char buf[1024], *newline;
|
||||||
|
|
||||||
if (!FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
|
if (!FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
|
||||||
|
|
|
@ -39,7 +39,7 @@ extern void hex2bin(char *src, char *dst, int length);
|
||||||
extern void bin2hex(char *src, char *dst, int length);
|
extern void bin2hex(char *src, char *dst, int length);
|
||||||
|
|
||||||
#ifdef HAVE_MINGW
|
#ifdef HAVE_MINGW
|
||||||
extern char *winerror(int);
|
extern const char *winerror(int);
|
||||||
#define strerror(x) ((x)>0?strerror(x):winerror(GetLastError()))
|
#define strerror(x) ((x)>0?strerror(x):winerror(GetLastError()))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue