Commit 47f26faa 47f26faaecf71ffc88640f5b139eaf87e59d68f2 by Sergey Poznyakoff

mu dbm: minor fix

* mu/dbm.c (add_records): Initialize format.
1 parent fc93493b
Showing 1 changed file with 4 additions and 1 deletions
...@@ -318,7 +318,8 @@ static int format_count = MU_ARRAY_SIZE (format_tab) - 1; ...@@ -318,7 +318,8 @@ 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 321 #define DEFAULT_LOAD_FORMAT (&format_tab[0])
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;
324 325
...@@ -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 */
......