summaryrefslogtreecommitdiffstats
path: root/src/sh_database.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sh_database.c')
-rw-r--r--src/sh_database.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/sh_database.c b/src/sh_database.c
index fdeed45..31a5919 100644
--- a/src/sh_database.c
+++ b/src/sh_database.c
@@ -283,7 +283,7 @@ static int insert_value (char * ptr, const char * str)
static void init_db_entry (dbins * ptr)
{
- memset (ptr, (int) '\0', sizeof(dbins));
+ memset (ptr, 0, sizeof(dbins));
ptr->next = NULL;
return;
}
@@ -1122,12 +1122,7 @@ int sh_database_query (char * query, /*@out@*/ long * id)
* We don't check the return value because it's useless (failure due
* to lack of access permission is not reported).
*/
-#if !defined(__x86_64__)
- /*
- * libmysql segfaults on x86-64 if this is used
- */
mysql_options(db_conn, MYSQL_READ_DEFAULT_GROUP, _("samhain"));
-#endif
status = 0;
@@ -1148,6 +1143,7 @@ int sh_database_query (char * query, /*@out@*/ long * id)
SL_RETURN(0, _("sh_database_query"));
}
}
+
connection_status = S_TRUE;
}
else
@@ -1410,7 +1406,7 @@ long sh_database_entry (dbins * db_entry, long id)
}
/*@-type@*//* byte* versus char[..] */
if (attr_tab[i].inHash == 1 &&
- ((char *)(db_entry)+attr_tab[i].off) != '\0')
+ *((char *)(db_entry)+attr_tab[i].off) != '\0')
{
(void)md5Update(&crc,
(sh_byte*) ((char *)(db_entry)+attr_tab[i].off),