mirror of
https://github.com/mdbtools/mdbtools.git
synced 2026-03-10 00:20:54 +08:00
Allow CFLGAS="-std=c99 -D_POSIX_C_SOURCE=2"
Use glib function: strcasecmp -> g_ascii_strcasecmp bzero -> memset strdup -> g_strdump Don't use arithmetic void*+int
This commit is contained in:
@@ -42,7 +42,7 @@ int len;
|
||||
mdb = mdb_open(argv[1], MDB_WRITABLE);
|
||||
tabname = argv[2];
|
||||
sargname = argv[3];
|
||||
updstr = strdup(argv[4]);
|
||||
updstr = g_strdup(argv[4]);
|
||||
|
||||
table = mdb_read_table_by_name(mdb, tabname, MDB_TABLE);
|
||||
|
||||
@@ -78,7 +78,7 @@ void read_to_row(MdbTableDef *table, char *sargname)
|
||||
sargcol = strtok(sargname," ");
|
||||
for (i=0;i<table->num_cols;i++) {
|
||||
col=g_ptr_array_index(table->columns,i);
|
||||
if (!strcasecmp(col->name, (char *)sargcol)) {
|
||||
if (!g_ascii_strcasecmp(col->name, (char *)sargcol)) {
|
||||
sarg.col = col;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user