change function die, warn, inform and debug

change funcions die, warn, inform and debug argument from `char*` to `const char*` to prevent a warning in C==
This commit is contained in:
Yann Pomarede
2017-02-28 12:47:03 +01:00
parent 7b414f4ef8
commit 2ab2a84c14
2 changed files with 8 additions and 8 deletions
+4 -4
View File
@@ -91,7 +91,7 @@ int get_requested_connection_state_to_output() { return requested_connection_sta
void set_requested_connection_state_to_output(int v) { requested_connection_state_to_output = v; }
void die(char *format, ...) {
void die(const char *format, ...) {
char s[1024];
s[0] = 0;
va_list args;
@@ -103,7 +103,7 @@ void die(char *format, ...) {
exit(1);
}
void warn(char *format, ...) {
void warn(const char *format, ...) {
char s[1024];
s[0] = 0;
va_list args;
@@ -113,7 +113,7 @@ void warn(char *format, ...) {
daemon_log(LOG_WARNING, "%s", s);
}
void debug(int level, char *format, ...) {
void debug(int level, const char *format, ...) {
if (level > debuglev)
return;
char s[1024];
@@ -125,7 +125,7 @@ void debug(int level, char *format, ...) {
daemon_log(LOG_DEBUG, "%s", s);
}
void inform(char *format, ...) {
void inform(const char *format, ...) {
char s[1024];
s[0] = 0;
va_list args;
+4 -4
View File
@@ -172,10 +172,10 @@ uint64_t ranarray64u();
int64_t ranarray64i();
extern int debuglev;
void die(char *format, ...);
void warn(char *format, ...);
void inform(char *format, ...);
void debug(int level, char *format, ...);
void die(const char *format, ...);
void warn(const char *format, ...);
void inform(const char *format, ...);
void debug(int level, const char *format, ...);
uint8_t *base64_dec(char *input, int *outlen);
char *base64_enc(uint8_t *input, int length);