1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

#127: dtcm: solaris - use readdir instead of readdir_r

This commit is contained in:
Jon Trulson 2022-08-07 15:11:21 -06:00
parent f0494103c3
commit e03eabfd59

View file

@ -1293,17 +1293,7 @@ _ListCalendarNames(uint *num_names, char ***names)
if ((dirp = opendir(".")) == NULL) if ((dirp = opendir(".")) == NULL)
return (CSA_E_FAILURE); return (CSA_E_FAILURE);
#ifdef SunOS
if ((dp = (struct dirent *)malloc(sizeof(struct dirent) + FILENAME_MAX))
== NULL) {
closedir(dirp);
return (CSA_E_INSUFFICIENT_MEMORY);
}
while (dp = readdir_r(dirp, dp)) {
#else
while (dp = readdir(dirp)) { while (dp = readdir(dirp)) {
#endif
if (strncmp(dp->d_name, "callog.", strlen("callog.")) == 0) { if (strncmp(dp->d_name, "callog.", strlen("callog.")) == 0) {
if (count == num) { if (count == num) {
count += _NAME_INCREMENT; count += _NAME_INCREMENT;