Allow fill_archive to be called with NULL fname.
The fill_archive function should support being called with a NULL fname argument. A NULL fname argument indicates that the default archive should be opened. We enable this by setting ah.fname to NULL before initializing ah or calling open_archive. This way if fname is NULL then ah.fname remains NULL and open_archive opens the default archive.
This commit is contained in:
parent
f03231b069
commit
f6520166f4
@ -311,6 +311,7 @@ fill_archive (struct locarhandle *tmpl_ah,
|
|||||||
|
|
||||||
/* Open the archive. This call never returns if we cannot
|
/* Open the archive. This call never returns if we cannot
|
||||||
successfully open the archive. */
|
successfully open the archive. */
|
||||||
|
ah.fname = NULL;
|
||||||
if (fname != NULL)
|
if (fname != NULL)
|
||||||
ah.fname = fname;
|
ah.fname = fname;
|
||||||
open_archive (&ah, false);
|
open_archive (&ah, false);
|
||||||
|
Loading…
Reference in New Issue
Block a user