From a344c8a50792b385b2cf86c18a484e23433f5c1b Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 14 Jan 2006 19:21:03 +0000 Subject: SQL uses some crappy structs with pointer voodoo that prevent comparison with if() ! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2791 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/extra/m_sql.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/modules/extra') diff --git a/src/modules/extra/m_sql.cpp b/src/modules/extra/m_sql.cpp index 5d79d7596..9ee483a73 100644 --- a/src/modules/extra/m_sql.cpp +++ b/src/modules/extra/m_sql.cpp @@ -122,13 +122,10 @@ class SQLConnection { while (field_count < mysql_field_count(&connection)) { - if ((fields[field_count]) && (fields[field_count].name) && (row[field_count])) - { - std::string a = (fields[field_count].name ? fields[field_count].name : ""); - std::string b = (row[field_count] ? row[field_count] : ""); - thisrow[a] = b; - field_count++; - } + std::string a = (fields[field_count].name ? fields[field_count].name : ""); + std::string b = (row[field_count] ? row[field_count] : ""); + thisrow[a] = b; + field_count++; } return thisrow; } -- cgit v1.2.3