trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject trafficserver git commit: Clean up formatting slightly
Date Tue, 10 Feb 2015 03:06:36 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/master e7f04708c -> 87efe7937


Clean up formatting slightly


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/87efe793
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/87efe793
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/87efe793

Branch: refs/heads/master
Commit: 87efe7937498d58c0f4e15505aa17946a42bb3c8
Parents: e7f0470
Author: Leif Hedstrom <zwoop@apache.org>
Authored: Mon Feb 9 20:06:31 2015 -0700
Committer: Leif Hedstrom <zwoop@apache.org>
Committed: Mon Feb 9 20:06:31 2015 -0700

----------------------------------------------------------------------
 example/remap_header_add/remap_header_add.cc | 31 +++++++++++++++++------
 1 file changed, 23 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/87efe793/example/remap_header_add/remap_header_add.cc
----------------------------------------------------------------------
diff --git a/example/remap_header_add/remap_header_add.cc b/example/remap_header_add/remap_header_add.cc
index 389fbea..d42bf64 100644
--- a/example/remap_header_add/remap_header_add.cc
+++ b/example/remap_header_add/remap_header_add.cc
@@ -27,8 +27,6 @@
     map /foo http://127.0.0.1/ @plugin=remap_header_add.so @pparam=foo:"x" @pparam=@test:"c"
@pparam=a:"b"
 
  */
-
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -36,7 +34,8 @@
 #include "ts/ts.h"
 #include "ts/remap.h"
 
-struct remap_line {
+struct remap_line
+{
   int argc;
   char **argv; // store the originals
 
@@ -49,8 +48,12 @@ struct remap_line {
 #define NOWARN_UNUSED __attribute__ ((unused))
 #define EXTERN extern "C"
 
-EXTERN void ParseArgIntoNv(const char *arg, char **n, char **v) {
+
+EXTERN void
+ParseArgIntoNv(const char *arg, char **n, char **v)
+{
   const char *colon_pos = strchr(arg, ':');
+
   if (colon_pos == NULL) {
     *n = NULL;
     *v = NULL;
@@ -78,11 +81,17 @@ EXTERN void ParseArgIntoNv(const char *arg, char **n, char **v) {
   TSDebug(TAG, "\t name_len=%zu, val_len=%zu, %s=%s", name_len, val_len, *n, *v);
 }
 
-TSReturnCode TSRemapInit(NOWARN_UNUSED TSRemapInterface *api_info, NOWARN_UNUSED char *errbuf,
NOWARN_UNUSED int errbuf_size) {
+
+TSReturnCode
+TSRemapInit(NOWARN_UNUSED TSRemapInterface *api_info, NOWARN_UNUSED char *errbuf, NOWARN_UNUSED
int errbuf_size)
+{
   return TS_SUCCESS;
 }
 
-TSReturnCode TSRemapNewInstance(int argc, char* argv[], void** ih, NOWARN_UNUSED char* errbuf,
NOWARN_UNUSED int errbuf_size) {
+
+TSReturnCode
+TSRemapNewInstance(int argc, char* argv[], void** ih, NOWARN_UNUSED char* errbuf, NOWARN_UNUSED
int errbuf_size)
+{
   remap_line *rl = NULL;
 
   TSDebug(TAG, "TSRemapNewInstance()");
@@ -113,7 +122,9 @@ TSReturnCode TSRemapNewInstance(int argc, char* argv[], void** ih, NOWARN_UNUSED
   return TS_SUCCESS;
 }
 
-void TSRemapDeleteInstance(void* ih)
+
+void
+TSRemapDeleteInstance(void* ih)
 {
   TSDebug(TAG, "deleting instance %p", ih);
 
@@ -130,7 +141,10 @@ void TSRemapDeleteInstance(void* ih)
   }
 }
 
-TSRemapStatus TSRemapDoRemap(void* ih, NOWARN_UNUSED TSHttpTxn txn, NOWARN_UNUSED TSRemapRequestInfo
*rri) {
+
+TSRemapStatus
+TSRemapDoRemap(void* ih, NOWARN_UNUSED TSHttpTxn txn, NOWARN_UNUSED TSRemapRequestInfo *rri)
+{
   remap_line *rl = (remap_line *) ih;
 
   if (!rl || !rri) {
@@ -159,5 +173,6 @@ TSRemapStatus TSRemapDoRemap(void* ih, NOWARN_UNUSED TSHttpTxn txn, NOWARN_UNUSE
       TSError(TAG ": Failure on TSMimeHdrFieldCreate");
     }
   }
+
   return TSREMAP_NO_REMAP;
 }


Mime
View raw message