diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-12-05 14:42:12 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2012-12-06 20:30:34 +0100 |
commit | 5ae805a15be4aff0e012da58f02a2aada02f2018 (patch) | |
tree | 59faa4fff15302073ccc9bc231e98a5d30bbe7ba /libmsi/table.c | |
parent | 5720d463bbdcaa252ba3dc8cc2633a2a8994f2cb (diff) | |
download | msitools-5ae805a15be4aff0e012da58f02a2aada02f2018.tar.gz msitools-5ae805a15be4aff0e012da58f02a2aada02f2018.tar.xz msitools-5ae805a15be4aff0e012da58f02a2aada02f2018.zip |
convert array-strings to literals
Diffstat (limited to 'libmsi/table.c')
-rw-r--r-- | libmsi/table.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/libmsi/table.c b/libmsi/table.c index d22ecd2..f95e813 100644 --- a/libmsi/table.c +++ b/libmsi/table.c @@ -30,7 +30,7 @@ #define LibmsiTable_HASH_TABLE_SIZE 37 -static const char szDot[] = {'.',0}; +static const char szDot[] = "."; typedef struct LibmsiColumnHashEntry { @@ -65,11 +65,11 @@ struct LibmsiTable }; /* information for default tables */ -static const char szTables[] = {'_','T','a','b','l','e','s',0}; -static const char szTable[] = {'T','a','b','l','e',0}; -static const char szColumns[] = {'_','C','o','l','u','m','n','s',0}; -static const char szNumber[] = {'N','u','m','b','e','r',0}; -static const char szType[] = {'T','y','p','e',0}; +static const char szTables[] = "_Tables"; +static const char szTable[] = "Table"; +static const char szColumns[] = "_Columns"; +static const char szNumber[] = "Number"; +static const char szType[] = "Type"; static const LibmsiColumnInfo _Columns_cols[4] = { { szColumns, 1, szTable, MSITYPE_VALID | MSITYPE_STRING | MSITYPE_KEY | 64, 0, 0, 0, NULL }, @@ -1100,7 +1100,7 @@ static unsigned msi_stream_name( const LibmsiTableView *tv, unsigned row, char * } else { - static const char fmt[] = { '%','d',0 }; + static const char fmt[] = "%d"; unsigned n = bytes_per_column( tv->db, &tv->columns[i], LONG_STR_BYTES ); switch( n ) @@ -1225,11 +1225,8 @@ static unsigned table_view_get_row( LibmsiView *view, unsigned row, LibmsiRecord static unsigned _libmsi_add_stream( LibmsiDatabase *db, const char *name, GsfInput *data ) { - static const char insert[] = { - 'I','N','S','E','R','T',' ','I','N','T','O',' ', - '`','_','S','t','r','e','a','m','s','`',' ', - '(','`','N','a','m','e','`',',','`','D','a','t','a','`',')',' ', - 'V','A','L','U','E','S',' ','(','?',',','?',')',0}; + static const char insert[] = + "INSERT INTO `_Streams`(`Name`, `Data`) VALUES (?, ?)"; LibmsiQuery *query = NULL; LibmsiRecord *rec; unsigned r; |