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:
parent
f0494103c3
commit
e03eabfd59
1 changed files with 0 additions and 10 deletions
|
@ -1293,17 +1293,7 @@ _ListCalendarNames(uint *num_names, char ***names)
|
|||
if ((dirp = opendir(".")) == NULL)
|
||||
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)) {
|
||||
#endif
|
||||
if (strncmp(dp->d_name, "callog.", strlen("callog.")) == 0) {
|
||||
if (count == num) {
|
||||
count += _NAME_INCREMENT;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue