Skip to content

Commit

Permalink
Merge branches 'mx_mysql' and 'mx_util/core' into mxqsub
Browse files Browse the repository at this point in the history
* mx_mysql:
  mx_mysql: Remove duplicate debug message

* mx_util/core:
  mx_util: Assertion loglevel increased to emergency
  mx_util: Remove unused variables
  mx_util: Add mx_calloc*()
  • Loading branch information
mariux committed May 21, 2015
3 parents eb63d22 + 97e1062 + 874fd1e commit 1dc2db8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
1 change: 0 additions & 1 deletion mx_mysql.c
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,6 @@ static int mx_mysql_real_connect(struct mx_mysql *mysql, const char *host, const
return 0;
}

mx_log_debug("ERROR: mysql_real_connect(): %s", mx__mysql_error(mysql));
return res;
}

Expand Down
10 changes: 0 additions & 10 deletions mx_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ inline int mx_strtoll(char *str, signed long long int *to)
int mx_strtoui(char *str, unsigned int *to)
{
unsigned long int ul;
char *end;
int res;

assert(str);
Expand All @@ -226,7 +225,6 @@ int mx_strtoui(char *str, unsigned int *to)
int mx_strtou8(char *str, uint8_t *to)
{
unsigned long int ul;
char *end;
int res;

assert(str);
Expand All @@ -247,7 +245,6 @@ int mx_strtou8(char *str, uint8_t *to)
int mx_strtou16(char *str, uint16_t *to)
{
unsigned long int ul;
char *end;
int res;

assert(str);
Expand All @@ -268,7 +265,6 @@ int mx_strtou16(char *str, uint16_t *to)
int mx_strtou32(char *str, uint32_t *to)
{
unsigned long int ul;
char *end;
int res;

assert(str);
Expand All @@ -289,7 +285,6 @@ int mx_strtou32(char *str, uint32_t *to)
int mx_strtou64(char *str, uint64_t *to)
{
unsigned long long int ull;
char *end;
int res;

assert(str);
Expand All @@ -312,7 +307,6 @@ int mx_strtou64(char *str, uint64_t *to)
int mx_strtoi(char *str, signed int *to)
{
signed long int l;
char *end;
int res;

assert(str);
Expand All @@ -333,7 +327,6 @@ int mx_strtoi(char *str, signed int *to)
int mx_strtoi8(char *str, int8_t *to)
{
signed long int l;
char *end;
int res;

assert(str);
Expand All @@ -354,7 +347,6 @@ int mx_strtoi8(char *str, int8_t *to)
int mx_strtoi16(char *str, int16_t *to)
{
signed long int l;
char *end;
int res;

assert(str);
Expand All @@ -375,7 +367,6 @@ int mx_strtoi16(char *str, int16_t *to)
int mx_strtoi32(char *str, int32_t *to)
{
signed long int l;
char *end;
int res;

assert(str);
Expand All @@ -396,7 +387,6 @@ int mx_strtoi32(char *str, int32_t *to)
int mx_strtoi64(char *str, int64_t *to)
{
signed long long int ll;
char *end;
int res;

assert(str);
Expand Down
4 changes: 2 additions & 2 deletions mx_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
do {\
if (!(test)) {\
errno=(eno);\
mx_log_debug("Assertion '" #test "' failed. Returning -(errno=" #eno ") [%d]: %m", -errno);\
mx_log_emerg("Assertion '" #test "' failed. Returning -(errno=" #eno ") [%d]: %m", -errno);\
return -errno;\
}\
} while (0)
Expand All @@ -27,7 +27,7 @@
do {\
if (!(test)) {\
errno=(eno);\
mx_log_debug("Assertion '" #test "' failed. Setting errno=" #eno " [%d] and returning NULL: %m", errno);\
mx_log_emerg("Assertion '" #test "' failed. Setting errno=" #eno " [%d] and returning NULL: %m", errno);\
return NULL;\
}\
} while (0)
Expand Down

0 comments on commit 1dc2db8

Please sign in to comment.