(parse_generation): return if there is no generation (spotted by

Daniel Kouril)


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11380 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
2002-09-04 20:44:35 +00:00
parent 53e6687014
commit 921f49e5cb

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997-2001 Kungliga Tekniska H<>gskolan
* Copyright (c) 1997-2002 Kungliga Tekniska H<>gskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -288,8 +288,10 @@ parse_generation(char *str, GENERATION **gen)
char *p;
int v;
if(strcmp(str, "-") == 0 || *str == '\0')
if(strcmp(str, "-") == 0 || *str == '\0') {
*gen = NULL;
return 0;
}
*gen = calloc(1, sizeof(**gen));
p = strsep(&str, ":");