Quieten some sql warnings
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 1 Dec 2012 18:03:34 +0000 (18:03 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 1 Dec 2012 18:03:34 +0000 (18:03 +0000)
src/modules/rlm_sql/drivers/rlm_sql_mysql/rlm_sql_mysql.c
src/modules/rlm_sql/rlm_sql.c

index def6b13..b4a8d49 100644 (file)
@@ -182,7 +182,8 @@ static int sql_check_error(int error)
  *     Purpose: Issue a query to the database
  *
  *************************************************************************/
-static int sql_query(SQLSOCK * sqlsocket, SQL_CONFIG *config, char *querystr)
+static int sql_query(SQLSOCK * sqlsocket, UNUSED SQL_CONFIG *config,
+                    char *querystr)
 {
        rlm_sql_mysql_sock *mysql_sock = sqlsocket->conn;
 
index cf711f2..325e310 100644 (file)
@@ -1232,8 +1232,8 @@ static int rlm_sql_redundant(SQL_INST *inst, REQUEST *request,
        if (section->reference[0] != '.')
                *p++ = '.';
        
-       if (radius_xlat(p, (sizeof(path) - (p - path)) - 1,
-                       section->reference, request, NULL, NULL) < 0)
+       if (!radius_xlat(p, (sizeof(path) - (p - path)) - 1,
+                       section->reference, request, NULL, NULL))
                return RLM_MODULE_FAIL;
 
        item = cf_reference_item(NULL, section->cs, path);