summaryrefslogtreecommitdiff
path: root/ACE/ace/OS_NS_stdio.inl
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>2014-08-05 21:52:03 +0000
committerSteve Huston <shuston@riverace.com>2014-08-05 21:52:03 +0000
commit133371f204a08ba44d404f75e4382f9117c23e78 (patch)
tree116d59827a141e4e0e43fd891663af6c6ae7fcb4 /ACE/ace/OS_NS_stdio.inl
parent4006db684e05e5e2d6682cfccfedbfcbad24b780 (diff)
downloadATCD-133371f204a08ba44d404f75e4382f9117c23e78.tar.gz
ChangeLogTag:Tue Aug 5 21:49:12 UTC 2014 Steve Huston <shuston@riverace.com>
Diffstat (limited to 'ACE/ace/OS_NS_stdio.inl')
-rw-r--r--ACE/ace/OS_NS_stdio.inl4
1 files changed, 3 insertions, 1 deletions
diff --git a/ACE/ace/OS_NS_stdio.inl b/ACE/ace/OS_NS_stdio.inl
index 66798d3c36d..f08a1ece692 100644
--- a/ACE/ace/OS_NS_stdio.inl
+++ b/ACE/ace/OS_NS_stdio.inl
@@ -1110,7 +1110,9 @@ ACE_OS::vsnprintf (wchar_t *buffer, size_t maxlen, const wchar_t *format, va_lis
// was available. Earlier variants of the vsnprintf() (e.g. UNIX98)
// defined it to return -1. This method follows the C99 standard,
// but needs to guess at the value; uses maxlen + 1.
- if (result == -1)
+ // Note that a formatting failure also returns -1. On RHEL this is
+ // errno EINVAL. Don't indicate a simple memory shortage for that.
+ if (result == -1 && errno != EINVAL)
result = static_cast <int> (maxlen + 1);
return result;