From ae912d6c208d27b897d6d43464e992e84c08cd33 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 21 Feb 2013 16:14:52 +0000 Subject: [PATCH] Move default seed setting to main(). This will make it easier to change later and will simplify the seed file option parsing which is to come. No functional change. Signed-off-by: Ian Jackson --- vbig.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vbig.cc b/vbig.cc index 84b2930..f4f6217 100644 --- a/vbig.cc +++ b/vbig.cc @@ -111,8 +111,8 @@ static void flushCache(FILE *fp) { static long long execute(mode_type mode, bool entire, const char *show); static const char default_seed[] = "hexapodia as the key insight"; -static const void *seed = default_seed; -static size_t seedlen = sizeof(default_seed)-1; +static const void *seed; +static size_t seedlen; static const char *path; static bool entireopt = false; static bool flush = false; @@ -148,6 +148,10 @@ int main(int argc, char **argv) { if(argc < (mode == VERIFY ? 1 : 2)) fatal(0, "insufficient arguments"); } + if (!seed) { + seed = default_seed; + seedlen = sizeof(default_seed)-1; + } path = argv[0]; if(argc > 1) { errno = 0; -- 2.30.2