mu dbm: minor fix
* mu/dbm.c (add_records): Initialize format.
Showing
1 changed file
with
3 additions
and
0 deletions
... | @@ -318,6 +318,7 @@ static int format_count = MU_ARRAY_SIZE (format_tab) - 1; | ... | @@ -318,6 +318,7 @@ static int format_count = MU_ARRAY_SIZE (format_tab) - 1; |
318 | 318 | ||
319 | #define DEFAULT_LIST_FORMAT (&format_tab[0]) | 319 | #define DEFAULT_LIST_FORMAT (&format_tab[0]) |
320 | #define DEFAULT_DUMP_FORMAT (&format_tab[1]) | 320 | #define DEFAULT_DUMP_FORMAT (&format_tab[1]) |
321 | #define DEFAULT_LOAD_FORMAT (&format_tab[0]) | ||
321 | 322 | ||
322 | static struct xfer_format *format; | 323 | static struct xfer_format *format; |
323 | static const char *dump_format_version; | 324 | static const char *dump_format_version; |
... | @@ -1244,6 +1245,8 @@ add_records (int mode, int replace) | ... | @@ -1244,6 +1245,8 @@ add_records (int mode, int replace) |
1244 | if (wsflags & MU_WRDSF_REUSE) | 1245 | if (wsflags & MU_WRDSF_REUSE) |
1245 | mu_wordsplit_free (&ws); | 1246 | mu_wordsplit_free (&ws); |
1246 | 1247 | ||
1248 | if (!format) | ||
1249 | format = DEFAULT_LOAD_FORMAT; | ||
1247 | init_format (1, &input); | 1250 | init_format (1, &input); |
1248 | 1251 | ||
1249 | /* Open the database */ | 1252 | /* Open the database */ | ... | ... |
-
Please register or sign in to post a comment