mirror of
https://github.com/mdbtools/mdbtools.git
synced 2025-10-22 03:37:26 +08:00
Remove unnecessary casts
This commit is contained in:
@@ -168,11 +168,11 @@ main(int argc, char **argv)
|
||||
mdb_read_columns(table);
|
||||
mdb_rewind_table(table);
|
||||
|
||||
bound_values = (char **) g_malloc(table->num_cols * sizeof(char *));
|
||||
bound_lens = (int *) g_malloc(table->num_cols * sizeof(int));
|
||||
bound_values = g_malloc(table->num_cols * sizeof(char *));
|
||||
bound_lens = g_malloc(table->num_cols * sizeof(int));
|
||||
for (i = 0; i < table->num_cols; i++) {
|
||||
/* bind columns */
|
||||
bound_values[i] = (char *) g_malloc0(EXPORT_BIND_SIZE);
|
||||
bound_values[i] = g_malloc0(EXPORT_BIND_SIZE);
|
||||
ret = mdb_bind_column(table, i + 1, bound_values[i], &bound_lens[i]);
|
||||
if (ret == -1) {
|
||||
fprintf(stderr, "Failed to bind column %d\n", i + 1);
|
||||
|
@@ -162,11 +162,11 @@ main(int argc, char **argv)
|
||||
mdb_read_columns(table);
|
||||
mdb_rewind_table(table);
|
||||
|
||||
bound_values = (char **) g_malloc(table->num_cols * sizeof(char *));
|
||||
bound_lens = (int *) g_malloc(table->num_cols * sizeof(int));
|
||||
bound_values = g_malloc(table->num_cols * sizeof(char *));
|
||||
bound_lens = g_malloc(table->num_cols * sizeof(int));
|
||||
for (i=0;i<table->num_cols;i++) {
|
||||
/* bind columns */
|
||||
bound_values[i] = (char *) g_malloc0(EXPORT_BIND_SIZE);
|
||||
bound_values[i] = g_malloc0(EXPORT_BIND_SIZE);
|
||||
ret = mdb_bind_column(table, i+1, bound_values[i], &bound_lens[i]);
|
||||
if (ret == -1) {
|
||||
fprintf(stderr, "Failed to bind column %d\n", i + 1);
|
||||
|
@@ -398,7 +398,7 @@ main(int argc, char **argv)
|
||||
|
||||
/* give the buffer an initial size */
|
||||
bufsz = 4096;
|
||||
mybuf = (char *) g_malloc(bufsz);
|
||||
mybuf = g_malloc(bufsz);
|
||||
mybuf[0]='\0';
|
||||
|
||||
while (1) {
|
||||
|
Reference in New Issue
Block a user