Displaying 3 results from an estimated 3 matches for "f099a22".
Did you mean:
1099,22
2016 May 24
2
[PATCH] utils: make guestfs_int_count_strings return 0 on NULL input
This miniature patch makes function guestfs_int_count_strings accept NULL input
and return 0 signalling that it is empty list. It makes it more usefull with
NULL initialized variables and a tiny bit more robust.
Maros Zatko (1):
utils: make guestfs_int_count_strings return 0 on NULL input
src/utils.c | 3 +++
1 file changed, 3 insertions(+)
--
2.5.5
2016 May 24
0
[PATCH] utils: make guestfs_int_count_strings return 0 on NULL input
Make guestfs_int_count_strings a bit more robust and usefull with NULL
initialized variables.
---
src/utils.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/utils.c b/src/utils.c
index f099a22..3639e92 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -55,6 +55,9 @@ guestfs_int_count_strings (char *const *argv)
{
size_t r;
+ if (argv == NULL)
+ return 0;
+
for (r = 0; argv[r]; ++r)
;
--
2.5.5
2016 Mar 06
8
[PATCH 0/5] Use less stack.
Various changes/fixes to use smaller stack frames.
Rich.