# HG changeset patch # User Keir Fraser # Date 1265190325 0 # Node ID b48b5e68847004aeed118d8941cb4b95578eb2e5 # Parent 2a775968c7a1614d9a799c44d7eec170340d573d xl: Do not duplicate last line of config file when trying compat mode. Signed-off-by: Ian Jackson diff -r 2a775968c7a1 -r b48b5e688470 tools/libxl/xl.c --- a/tools/libxl/xl.c Wed Feb 03 09:45:02 2010 +0000 +++ b/tools/libxl/xl.c Wed Feb 03 09:45:25 2010 +0000 @@ -344,6 +344,7 @@ static char* compat_config_file(const ch } while (!feof(s)) { + buf[0] = 0; fgets(buf, size, s); while (buf[strlen(buf) - 1] != '\n' && !feof(s)) { size += 1024;