From a73671c0d39c52b40dc6422c66bebef5552a7011 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Tue, 8 Dec 2009 11:10:52 -0500 Subject: Avoid returning uninitialized result. If grouplist was a zero-length array, we would return ret unitialized. --- server/tools/tools_util.c | 1 + 1 file changed, 1 insertion(+) (limited to 'server') diff --git a/server/tools/tools_util.c b/server/tools/tools_util.c index b509ccb26..97945238e 100644 --- a/server/tools/tools_util.c +++ b/server/tools/tools_util.c @@ -207,6 +207,7 @@ int check_group_names(struct tools_ctx *tctx, return ENOMEM; } + ret = EOK; for (i=0; grouplist[i]; ++i) { ret = sysdb_getgrnam_sync(tctx, tctx->ev, -- cgit