summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcallum_linden <none@none>2014-10-17 16:07:11 -0700
committercallum_linden <none@none>2014-10-17 16:07:11 -0700
commitbc49197ea84997d06dee6a92f60431de9fd0eb8c (patch)
tree8d94ea70e8209dbdc98426880e58de707c739a0d
parente6bfaa3d5b5ae3d0595cd17be034fcbea9f45dde (diff)
Update to build on Xcode 6.0: interesting - clang doesn't like it if you specify extra components of a format string that aren't populated in snprintf
-rwxr-xr-xindra/llcorehttp/_httpoprequest.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/indra/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp
index 43dd069bc6..b121312ac0 100755
--- a/indra/llcorehttp/_httpoprequest.cpp
+++ b/indra/llcorehttp/_httpoprequest.cpp
@@ -568,9 +568,18 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service)
(mReqLength ? fmt1 : fmt2),
(unsigned long) mReqOffset, (unsigned long) (mReqOffset + mReqLength - 1));
#else
- snprintf(range_line, sizeof(range_line),
- (mReqLength ? fmt1 : fmt2),
- (unsigned long) mReqOffset, (unsigned long) (mReqOffset + mReqLength - 1));
+ if ( mReqLength )
+ {
+ snprintf(range_line, sizeof(range_line),
+ fmt1,
+ (unsigned long) mReqOffset, (unsigned long) (mReqOffset + mReqLength - 1));
+ }
+ else
+ {
+ snprintf(range_line, sizeof(range_line),
+ fmt2,
+ (unsigned long) mReqOffset);
+ }
#endif // LL_WINDOWS
range_line[sizeof(range_line) - 1] = '\0';
mCurlHeaders = curl_slist_append(mCurlHeaders, range_line);