Re: [Patch] replace readdir() by g_dir_read_name()
Peter Bloomfield <[email protected]>
| Newsgroups | gmane.comp.gnome.apps.balsa |
|---|---|
| Message-ID | <[email protected]> |
Hi Albrecht, On 12/12/2018 03:12:29 PM Wed, Albrecht Dreß wrote: > Hi all, > > running cppcheck on Balsa/s master sources, I got reports about readdir() not being thread-safe (“portability warnings”). Although there seems to be some confusion about this (see the glibc man page of readdir vs. IEEE 1003.1-2017), I think the better approach is to use the glib functions which also support other platforms like Windows cleanly (NB: the glib implementation uses readdir() for POSIX systems…). > > The attached patch replaces readdir() and friends by the glib functions, and also refactors the affected functions in libbalsa/folder-scanners.c a little bit as to avoid “continue” statements which (IMHO) make the code harder to read. > > Opinions? > > Cheers, > Albrecht. Thanks for the patch! Looks good! Builds and runs, and pushed to master. Best, Peter _______________________________________________ balsa-list mailing list [email protected] https://mail.gnome.org/mailman/listinfo/balsa-list
signature.asc
(application/pgp-signature, 195 B)
-----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQS030wPRfNNA5alz3MfX9S1uSp09QUCXBKT4QAKCRAfX9S1uSp0 9ZKOAJ9G66YwUxZKt/Lc4/MlQtVeLQn+ywCgqloFlQh+A7OecybSy9Mlr6reLDU= =To7n -----END PGP SIGNATURE-----