s4-torture: fixed uninitialised variable error
authorAndrew Tridgell <tridge@samba.org>
Wed, 13 Oct 2010 08:42:45 +0000 (19:42 +1100)
committerAndrew Tridgell <tridge@samba.org>
Wed, 13 Oct 2010 11:00:04 +0000 (11:00 +0000)
ret is uninitialised if the directory is empty

lib/torture/torture.c

index 9d77ab41d1a9d3a7a132382e90c506f6216bc0d4..1f55cd04a81bae4880c7890fa1001388a8010d3a 100644 (file)
@@ -96,7 +96,7 @@ _PUBLIC_ NTSTATUS torture_temp_dir(struct torture_context *tctx,
 
 static int local_deltree(const char *path)
 {
-       int ret;
+       int ret = 0;
        struct dirent *dirent;
        DIR *dir = opendir(path);
        if (!dir) {