serf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From astie...@apache.org
Subject svn commit: r1717357 - in /serf/trunk/buckets: request_buckets.c response_buckets.c
Date Tue, 01 Dec 2015 00:17:44 GMT
Author: astieger
Date: Tue Dec  1 00:17:43 2015
New Revision: 1717357

URL: http://svn.apache.org/viewvc?rev=1717357&view=rev
Log:
Follow-up to r1717352, use apr version of snprintf

* buckets/request_buckets.c
  (serialize_data): use apr_snprintf
* buckets/response_buckets.c
  (serf_bucket_outgoing_response_prepare,
  serialize_outgoing_response): same

Modified:
    serf/trunk/buckets/request_buckets.c
    serf/trunk/buckets/response_buckets.c

Modified: serf/trunk/buckets/request_buckets.c
URL: http://svn.apache.org/viewvc/serf/trunk/buckets/request_buckets.c?rev=1717357&r1=1717356&r2=1717357&view=diff
==============================================================================
--- serf/trunk/buckets/request_buckets.c (original)
+++ serf/trunk/buckets/request_buckets.c Tue Dec  1 00:17:43 2015
@@ -144,7 +144,7 @@ static void serialize_data(serf_bucket_t
        use chunked encoding for the request.  */
     if (ctx->len != LENGTH_UNKNOWN) {
         char buf[30];
-        snprintf(buf, 30, "%" APR_INT64_T_FMT, ctx->len);
+        apr_snprintf(buf, 30, "%" APR_INT64_T_FMT, ctx->len);
         serf_bucket_headers_set(ctx->headers, "Content-Length", buf);
         if (ctx->body != NULL)
             serf_bucket_aggregate_append(bucket, ctx->body);

Modified: serf/trunk/buckets/response_buckets.c
URL: http://svn.apache.org/viewvc/serf/trunk/buckets/response_buckets.c?rev=1717357&r1=1717356&r2=1717357&view=diff
==============================================================================
--- serf/trunk/buckets/response_buckets.c (original)
+++ serf/trunk/buckets/response_buckets.c Tue Dec  1 00:17:43 2015
@@ -852,7 +852,7 @@ void serf_bucket_outgoing_response_prepa
        (assuming this method is called for HTTP2) */
     if (content_length != SERF_LENGTH_UNKNOWN) {
         char buf[30];
-        snprintf(buf, 30, "%" APR_INT64_T_FMT, content_length);
+        apr_snprintf(buf, 30, "%" APR_INT64_T_FMT, content_length);
 
         serf_bucket_headers_setc(ctx->headers, "Content-Length", buf);
     }
@@ -884,7 +884,7 @@ static void serialize_outgoing_response(
         char start[32];
         struct iovec status_vecs[3];
 
-        snprintf(start, 32, "HTTP/%d.%d %03d ",
+        apr_snprintf(start, 32, "HTTP/%d.%d %03d ",
                 SERF_HTTP_VERSION_MAJOR(ctx->http_version),
                 SERF_HTTP_VERSION_MINOR(ctx->http_version),
                 ctx->status);



Mime
View raw message