diff options
Diffstat (limited to 'tools/libxl')
-rw-r--r-- | tools/libxl/libxl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index ca24ca37cd..b6daceaf9b 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -200,9 +200,12 @@ void libxl_string_list_dispose(libxl_string_list *psl) int libxl_string_list_length(const libxl_string_list *psl) { - if (!psl) return 0; int i = 0; - while ((*psl)[i]) i++; + + if (*psl) + while ((*psl)[i]) + i++; + return i; } |