[libglnx] dfditer: Unset initialized variable when cleared



commit 9a7277889a8901a60206e58bafe1a6fcd2a50bc9
Author: Colin Walters <walters verbum org>
Date:   Tue Mar 3 08:43:15 2015 -0500

    dfditer: Unset initialized variable when cleared
    
    This allows reusing an iterator struct.

 glnx-dirfd.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/glnx-dirfd.c b/glnx-dirfd.c
index ee25898..af4cab8 100644
--- a/glnx-dirfd.c
+++ b/glnx-dirfd.c
@@ -199,4 +199,5 @@ glnx_dirfd_iterator_clear (GLnxDirFdIterator *dfd_iter)
   GLnxRealDirfdIterator *real_dfd_iter = (GLnxRealDirfdIterator*) dfd_iter;
   /* fd is owned by dfd_iter */
   (void) closedir (real_dfd_iter->d);
+  real_dfd_iter->initialized = FALSE;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]