Browse Source

* fix errcb in source/redis

master
Alex 'AdUser' Z 8 years ago
parent
commit
2e97deef29
  1. 6
      src/sources/redis.c

6
src/sources/redis.c

@ -17,7 +17,7 @@ struct _config {
char name[ID_MAX + 1]; char name[ID_MAX + 1];
char hash[ID_MAX * 2]; char hash[ID_MAX * 2];
char error[256]; char error[256];
void (*errcb)(char *errstr); void (*errcb)(const char *errstr);
time_t timeout; time_t timeout;
uint8_t database; uint8_t database;
char password[32]; char password[32];
@ -27,7 +27,7 @@ struct _config {
}; };
static void static void
errcb_stub(char *str) { errcb_stub(const char *str) {
assert(str != NULL); assert(str != NULL);
(void)(str); (void)(str);
} }
@ -166,7 +166,7 @@ error(cfg_t *cfg) {
} }
void void
errcb(cfg_t *cfg, void (*cb)(char *errstr)) { errcb(cfg_t *cfg, void (*cb)(const char *errstr)) {
assert(cfg != NULL); assert(cfg != NULL);
assert(cb != NULL); assert(cb != NULL);

Loading…
Cancel
Save