summaryrefslogtreecommitdiffstats
path: root/libmsi/storages.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/storages.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/storages.c')
-rw-r--r--libmsi/storages.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/libmsi/storages.c b/libmsi/storages.c
index dae1a52..4529a8d 100644
--- a/libmsi/storages.c
+++ b/libmsi/storages.c
@@ -53,17 +53,17 @@ typedef struct tagMSISTORAGESVIEW
unsigned row_size;
} MSISTORAGESVIEW;
-static BOOL storages_set_table_size(MSISTORAGESVIEW *sv, unsigned size)
+static bool storages_set_table_size(MSISTORAGESVIEW *sv, unsigned size)
{
if (size >= sv->max_storages)
{
sv->max_storages *= 2;
sv->storages = msi_realloc(sv->storages, sv->max_storages * sizeof(STORAGE *));
if (!sv->storages)
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
static STORAGE *create_storage(MSISTORAGESVIEW *sv, const WCHAR *name, IStorage *stg)
@@ -149,7 +149,7 @@ static HRESULT stream_to_storage(IStream *stm, IStorage **stg)
if (FAILED(hr) || read != size)
goto done;
- hr = CreateILockBytesOnHGlobal(NULL, TRUE, &lockbytes);
+ hr = CreateILockBytesOnHGlobal(NULL, true, &lockbytes);
if (FAILED(hr))
goto done;
@@ -232,7 +232,7 @@ done:
return r;
}
-static unsigned STORAGES_insert_row(MSIVIEW *view, MSIRECORD *rec, unsigned row, BOOL temporary)
+static unsigned STORAGES_insert_row(MSIVIEW *view, MSIRECORD *rec, unsigned row, bool temporary)
{
MSISTORAGESVIEW *sv = (MSISTORAGESVIEW *)view;
@@ -278,7 +278,7 @@ static unsigned STORAGES_get_dimensions(MSIVIEW *view, unsigned *rows, unsigned
}
static unsigned STORAGES_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 )
{
TRACE("(%p, %d, %p, %p, %p, %p)\n", view, n, name, type, temporary,
table_name);
@@ -299,7 +299,7 @@ static unsigned STORAGES_get_column_info( MSIVIEW *view, unsigned n, const WCHAR
break;
}
if (table_name) *table_name = szStorages;
- if (temporary) *temporary = FALSE;
+ if (temporary) *temporary = false;
return ERROR_SUCCESS;
}
@@ -348,7 +348,7 @@ static unsigned storages_modify_assign(MSIVIEW *view, MSIRECORD *rec)
if (r == ERROR_SUCCESS)
return storages_modify_update(view, rec);
- return STORAGES_insert_row(view, rec, -1, FALSE);
+ return STORAGES_insert_row(view, rec, -1, false);
}
static unsigned STORAGES_modify(MSIVIEW *view, MSIMODIFY eModifyMode, MSIRECORD *rec, unsigned row)
@@ -364,7 +364,7 @@ static unsigned STORAGES_modify(MSIVIEW *view, MSIMODIFY eModifyMode, MSIRECORD
break;
case MSIMODIFY_INSERT:
- r = STORAGES_insert_row(view, rec, -1, FALSE);
+ r = STORAGES_insert_row(view, rec, -1, false);
break;
case MSIMODIFY_UPDATE:
@@ -481,7 +481,7 @@ static int add_storages_to_table(MSISTORAGESVIEW *sv)
if (!sv->storages)
return -1;
- while (TRUE)
+ while (true)
{
size = 0;
hr = IEnumSTATSTG_Next(stgenum, 1, &stat, &size);