diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-09-25 21:36:09 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-09-25 21:36:09 +0000 |
commit | 0acb675f88415443a036cf373b55338af4cb61cf (patch) | |
tree | 3a760e9be6caf142e31f5c26b8f10cc2ac1e60e6 /ace | |
parent | 37645e2bc7f1cdf9e0be9dc04495b01b6385cafe (diff) | |
download | ATCD-0acb675f88415443a036cf373b55338af4cb61cf.tar.gz |
(set_handle_limit): on platforms with ACE_LACKS_RLIMIT or !
RLIMIT_NOFILE, don't use ACE_NOTSUP_RETURN if the new_limit is <= the
cur_limit.
Diffstat (limited to 'ace')
-rw-r--r-- | ace/ACE.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/ace/ACE.cpp b/ace/ACE.cpp index 8a30840942e..9a5de8dd9f7 100644 --- a/ace/ACE.cpp +++ b/ace/ACE.cpp @@ -856,9 +856,9 @@ ACE::open_temp_file (const char *name, int mode, int perm) { #if defined (ACE_WIN32) return ACE_OS::open (name, - mode | FILE_FLAG_DELETE_ON_CLOSE); + mode | FILE_FLAG_DELETE_ON_CLOSE); #else - // Open it. + // Open it. ACE_HANDLE handle = ACE_OS::open (name, mode, perm); if (handle == ACE_INVALID_HANDLE) @@ -869,7 +869,7 @@ ACE::open_temp_file (const char *name, int mode, int perm) if (ACE_OS::unlink (name) == -1) return -1; else - // Return the handle. + // Return the handle. return handle; #endif /* ACE_WIN32 */ } @@ -1888,7 +1888,8 @@ ACE::set_handle_limit (int new_limit) return ACE_OS::setrlimit (RLIMIT_NOFILE, &rl); #else // We give a chance to platforms without RLIMIT to work. - ACE_NOTSUP_RETURN (0); + // Instead of ACE_NOTSUP_RETURN (0), just return 0 because + // new_limit is <= cur_limit, so it's a no-op. #endif /* ACE_LACKS_RLIMIT */ } } @@ -2934,9 +2935,9 @@ ACE::strnnew (const char *str, size_t n) } const char * -ACE::strend (const char *s) -{ - while (*s++ != '\0') +ACE::strend (const char *s) +{ + while (*s++ != '\0') continue; return s; |