[asterisk-commits] tilghman: branch 1.8 r311799 - /branches/1.8/cel/cel_odbc.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Mar 29 02:08:45 CDT 2011
Author: tilghman
Date: Tue Mar 29 02:08:39 2011
New Revision: 311799
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=311799
Log:
Remove extraneous check from integer-type fields.
(closes issue #19027)
Reported by: mlehner
Review: https://reviewboard.asterisk.org/r/1149/
Modified:
branches/1.8/cel/cel_odbc.c
Modified: branches/1.8/cel/cel_odbc.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/cel/cel_odbc.c?view=diff&rev=311799&r1=311798&r2=311799
==============================================================================
--- branches/1.8/cel/cel_odbc.c (original)
+++ branches/1.8/cel/cel_odbc.c Tue Mar 29 02:08:39 2011
@@ -571,9 +571,7 @@
}
break;
case SQL_INTEGER:
- if (ast_strlen_zero(colptr)) {
- continue;
- } else {
+ {
int integer = 0;
if (strcasecmp(entry->name, "eventtype") == 0) {
integer = (int) record.event_type;
@@ -590,9 +588,7 @@
}
break;
case SQL_BIGINT:
- if (ast_strlen_zero(colptr)) {
- continue;
- } else {
+ {
long long integer = 0;
if (strcasecmp(entry->name, "eventtype") == 0) {
integer = (long long) record.event_type;
@@ -609,9 +605,7 @@
}
break;
case SQL_SMALLINT:
- if (ast_strlen_zero(colptr)) {
- continue;
- } else {
+ {
short integer = 0;
if (strcasecmp(entry->name, "eventtype") == 0) {
integer = (short) record.event_type;
@@ -628,9 +622,7 @@
}
break;
case SQL_TINYINT:
- if (ast_strlen_zero(colptr)) {
- continue;
- } else {
+ {
char integer = 0;
if (strcasecmp(entry->name, "eventtype") == 0) {
integer = (char) record.event_type;
@@ -647,9 +639,7 @@
}
break;
case SQL_BIT:
- if (ast_strlen_zero(colptr)) {
- continue;
- } else {
+ {
char integer = 0;
if (strcasecmp(entry->name, "eventtype") == 0) {
integer = (char) record.event_type;
@@ -669,9 +659,7 @@
break;
case SQL_NUMERIC:
case SQL_DECIMAL:
- if (ast_strlen_zero(colptr)) {
- continue;
- } else {
+ {
double number = 0.0;
if (strcasecmp(entry->name, "eventtype") == 0) {
number = (double)record.event_type;
@@ -690,9 +678,7 @@
case SQL_FLOAT:
case SQL_REAL:
case SQL_DOUBLE:
- if (ast_strlen_zero(colptr)) {
- continue;
- } else {
+ {
double number = 0.0;
if (strcasecmp(entry->name, "eventtype") == 0) {
number = (double) record.event_type;
More information about the asterisk-commits
mailing list