ostree-repo-pull: always initialize flags_i

Otherwise we get undefined behaviour if the client didn't explicitly set
any flags.

Also, add documentation for all the other options supported by
ostree_repo_pull_with_options().

Closes: #252
Approved by: cgwalters
This commit is contained in:
Jonathan Lebon authored and Colin Walters (automation) committed 2016-04-11 13:31:20 +00:00
1 parent e62beae695
commit b69fd11487
2 files changed
+11 -5

No files matched your search

+1 -1
View File
@@ -1908,7 +1908,7 @@ ostree_repo_pull_with_options (OstreeRepo *self,
if (options)
{
int flags_i;
int flags_i = OSTREE_REPO_PULL_FLAGS_NONE;
(void) g_variant_lookup (options, "refs", "^a&s", &refs_to_fetch);
(void) g_variant_lookup (options, "flags", "i", &flags_i);
/* Reduce risk of issues if enum happens to be 64 bit for some reason */