summaryrefslogtreecommitdiffstats
path: root/libmsi/insert.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-10-23 11:26:15 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2012-12-06 20:29:12 +0100
commit99336e77ba153c8cf1175951ff2239d6ce422c91 (patch)
tree13fae16f0a5401b1e6a164b3f9c9310a3d167801 /libmsi/insert.c
parent30557984c4dac095c98ba7ba25afa6948d6f9934 (diff)
downloadmsitools-99336e77ba153c8cf1175951ff2239d6ce422c91.tar.gz
msitools-99336e77ba153c8cf1175951ff2239d6ce422c91.tar.xz
msitools-99336e77ba153c8cf1175951ff2239d6ce422c91.zip
get rid of the useless Win32 BOOL type
Diffstat (limited to 'libmsi/insert.c')
-rw-r--r--libmsi/insert.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/libmsi/insert.c b/libmsi/insert.c
index 27a78ef..9725d04 100644
--- a/libmsi/insert.c
+++ b/libmsi/insert.c
@@ -42,7 +42,7 @@ typedef struct tagMSIINSERTVIEW
MSIVIEW view;
MSIVIEW *table;
MSIDATABASE *db;
- BOOL bIsTemp;
+ bool bIsTemp;
MSIVIEW *sv;
column_info *vals;
} MSIINSERTVIEW;
@@ -105,7 +105,7 @@ err:
/* checks to see if the column order specified in the INSERT query
* matches the column order of the table
*/
-static BOOL msi_columns_in_order(MSIINSERTVIEW *iv, unsigned col_count)
+static bool msi_columns_in_order(MSIINSERTVIEW *iv, unsigned col_count)
{
const WCHAR *a;
const WCHAR *b;
@@ -116,9 +116,9 @@ static BOOL msi_columns_in_order(MSIINSERTVIEW *iv, unsigned col_count)
iv->sv->ops->get_column_info(iv->sv, i, &a, NULL, NULL, NULL);
iv->table->ops->get_column_info(iv->table, i, &b, NULL, NULL, NULL);
- if (strcmpW( a, b )) return FALSE;
+ if (strcmpW( a, b )) return false;
}
- return TRUE;
+ return true;
}
/* rearranges the data in the record to be inserted based on column order,
@@ -177,29 +177,29 @@ err:
return r;
}
-static BOOL row_has_null_primary_keys(MSIINSERTVIEW *iv, MSIRECORD *row)
+static bool row_has_null_primary_keys(MSIINSERTVIEW *iv, MSIRECORD *row)
{
unsigned r, i, col_count, type;
r = iv->table->ops->get_dimensions( iv->table, NULL, &col_count );
if (r != ERROR_SUCCESS)
- return FALSE;
+ return false;
for (i = 1; i <= col_count; i++)
{
r = iv->table->ops->get_column_info(iv->table, i, NULL, &type,
NULL, NULL);
if (r != ERROR_SUCCESS)
- return FALSE;
+ return false;
if (!(type & MSITYPE_KEY))
continue;
if (MSI_RecordIsNull(row, i))
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
static unsigned INSERT_execute( MSIVIEW *view, MSIRECORD *record )
@@ -279,7 +279,7 @@ static unsigned INSERT_get_dimensions( MSIVIEW *view, unsigned *rows, unsigned *
}
static unsigned INSERT_get_column_info( MSIVIEW *view, unsigned n, const WCHAR **name,
- unsigned *type, BOOL *temporary, const WCHAR **table_name )
+ unsigned *type, bool *temporary, const WCHAR **table_name )
{
MSIINSERTVIEW *iv = (MSIINSERTVIEW*)view;
MSIVIEW *sv;
@@ -359,7 +359,7 @@ static unsigned count_column_info( const column_info *ci )
}
unsigned INSERT_CreateView( MSIDATABASE *db, MSIVIEW **view, const WCHAR *table,
- column_info *columns, column_info *values, BOOL temp )
+ column_info *columns, column_info *values, bool temp )
{
MSIINSERTVIEW *iv = NULL;
unsigned r;