You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2013/04/17 23:33:32 UTC

git commit: TS-1662 Remove use of register storage class

Updated Branches:
  refs/heads/master 1d4ce3fa3 -> 0f171d335


TS-1662 Remove use of register storage class


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

Branch: refs/heads/master
Commit: 0f171d335dad37af553e535b4f969f5e52d2162d
Parents: 1d4ce3f
Author: Leif Hedstrom <zw...@apache.org>
Authored: Mon Mar 18 21:56:05 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Wed Apr 17 15:21:40 2013 -0600

----------------------------------------------------------------------
 CHANGES                             |    2 ++
 lib/ts/ink_res_init.cc              |    6 +++---
 lib/ts/ink_res_mkquery.cc           |    6 +++---
 lib/ts/ink_resolver.h               |   12 ++++++------
 lib/ts/ink_string.cc                |    4 ++--
 lib/ts/ink_string.h                 |    6 +++---
 mgmt/cli/cliParseArg.cc             |    2 +-
 plugins/experimental/hipes/hipes.cc |    2 +-
 proxy/logging/LogAccess.cc          |    4 ++--
 proxy/logging/LogFieldAliasMap.h    |    2 +-
 proxy/logging/LogUtils.cc           |    4 ++--
 tools/http_load/http_load.c         |    2 +-
 tools/http_load/timers.c            |    6 +++---
 13 files changed, 30 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0f171d33/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index e418fd7..8466cb9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,8 @@
   Changes with Apache Traffic Server 3.3.3
 
 
+  *) [TS-1662] Remove remaining use of register storage class.
+
   *) [TS-846] Eliminate proxy.config.remap.use_remap_processor.
 
   *) [TS-1802] Remove proxy.config.net.accept_throttle.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0f171d33/lib/ts/ink_res_init.cc
----------------------------------------------------------------------
diff --git a/lib/ts/ink_res_init.cc b/lib/ts/ink_res_init.cc
index d52057f..66362c6 100644
--- a/lib/ts/ink_res_init.cc
+++ b/lib/ts/ink_res_init.cc
@@ -302,9 +302,9 @@ ink_res_init(
   const char *pSearchList, ///< Unknown
   const char *pResolvConf ///< Path to configuration file.
 ) {
-  register FILE *fp;
-  register char *cp, **pp;
-  register int n;
+  FILE *fp;
+  char *cp, **pp;
+  int n;
   char buf[BUFSIZ];
   size_t nserv = 0;
   int haveenv = 0;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0f171d33/lib/ts/ink_res_mkquery.cc
----------------------------------------------------------------------
diff --git a/lib/ts/ink_res_mkquery.cc b/lib/ts/ink_res_mkquery.cc
index e0d5d7a..ebac663 100644
--- a/lib/ts/ink_res_mkquery.cc
+++ b/lib/ts/ink_res_mkquery.cc
@@ -100,9 +100,9 @@ ink_res_mkquery(ink_res_state statp,
 	     u_char *buf,		/*!< buffer to put query  */
 	     int buflen)		/*!< size of buffer  */
 {
-	register HEADER *hp;
-	register u_char *cp, *ep;
-	register int n;
+	HEADER *hp;
+	u_char *cp, *ep;
+	int n;
 	u_char *dnptrs[20], **dpp, **lastdnptr;
 
 	NOWARN_UNUSED(newrr_in);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0f171d33/lib/ts/ink_resolver.h
----------------------------------------------------------------------
diff --git a/lib/ts/ink_resolver.h b/lib/ts/ink_resolver.h
index dd7b037..80e0dfc 100644
--- a/lib/ts/ink_resolver.h
+++ b/lib/ts/ink_resolver.h
@@ -202,7 +202,7 @@ parse_host_res_preferences(
 
 #ifndef NS_GET16
 #define NS_GET16(s, cp) do { \
-        register const u_char *t_cp = (const u_char *)(cp); \
+        const u_char *t_cp = (const u_char *)(cp); \
         (s) = ((u_int16_t)t_cp[0] << 8) \
             | ((u_int16_t)t_cp[1]) \
             ; \
@@ -212,7 +212,7 @@ parse_host_res_preferences(
 
 #ifndef NS_GET32
 #define NS_GET32(l, cp) do { \
-        register const u_char *t_cp = (const u_char *)(cp); \
+        const u_char *t_cp = (const u_char *)(cp); \
         (l) = ((u_int32_t)t_cp[0] << 24) \
             | ((u_int32_t)t_cp[1] << 16) \
             | ((u_int32_t)t_cp[2] << 8) \
@@ -224,8 +224,8 @@ parse_host_res_preferences(
 
 #ifndef NS_PUT16
 #define NS_PUT16(s, cp) do { \
-        register u_int16_t t_s = (u_int16_t)(s); \
-        register u_char *t_cp = (u_char *)(cp); \
+        u_int16_t t_s = (u_int16_t)(s); \
+        u_char *t_cp = (u_char *)(cp); \
         *t_cp++ = t_s >> 8; \
         *t_cp   = t_s; \
         (cp) += NS_INT16SZ; \
@@ -234,8 +234,8 @@ parse_host_res_preferences(
 
 #ifndef NS_PUT32
 #define NS_PUT32(l, cp) do { \
-        register u_int32_t t_l = (u_int32_t)(l); \
-        register u_char *t_cp = (u_char *)(cp); \
+        u_int32_t t_l = (u_int32_t)(l); \
+        u_char *t_cp = (u_char *)(cp); \
         *t_cp++ = t_l >> 24; \
         *t_cp++ = t_l >> 16; \
         *t_cp++ = t_l >> 8; \

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0f171d33/lib/ts/ink_string.cc
----------------------------------------------------------------------
diff --git a/lib/ts/ink_string.cc b/lib/ts/ink_string.cc
index 0d45fad..e5ae94a 100644
--- a/lib/ts/ink_string.cc
+++ b/lib/ts/ink_string.cc
@@ -103,7 +103,7 @@ char *
 ink_string_concatenate_strings(char *dest, ...)
 {
   va_list ap;
-  register char *s, *d;
+  char *s, *d;
 
   va_start(ap, dest);
 
@@ -138,7 +138,7 @@ char *
 ink_string_concatenate_strings_n(char *dest, int n, ...)
 {
   va_list ap;
-  register char *s, *d;
+  char *s, *d;
 
   va_start(ap, n);
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0f171d33/lib/ts/ink_string.h
----------------------------------------------------------------------
diff --git a/lib/ts/ink_string.h b/lib/ts/ink_string.h
index de10e4a..6b6378f 100644
--- a/lib/ts/ink_string.h
+++ b/lib/ts/ink_string.h
@@ -151,7 +151,7 @@ ink_string_is_prefix(char *prefix, char *str)
 static inline char *
 ink_string_copy(char *dest, char *src, int n)
 {
-  register char *s, *d;
+  char *s, *d;
 
   s = src;
   d = dest;
@@ -178,9 +178,9 @@ ink_string_copy(char *dest, char *src, int n)
  *---------------------------------------------------------------------------*/
 
 static inline char *
-ink_string_concatenate_two_strings(char *dest, register char *s1, register char *s2)
+ink_string_concatenate_two_strings(char *dest, char *s1, char *s2)
 {
-  register char *d;
+  char *d;
 
   d = dest;
   while (*s1)

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0f171d33/mgmt/cli/cliParseArg.cc
----------------------------------------------------------------------
diff --git a/mgmt/cli/cliParseArg.cc b/mgmt/cli/cliParseArg.cc
index 9e4a065..a59d96d 100644
--- a/mgmt/cli/cliParseArg.cc
+++ b/mgmt/cli/cliParseArg.cc
@@ -398,7 +398,7 @@ static void
 PrintUsage(Tcl_Interp * interp, cli_CommandInfo * commandInfo)
 {
   NOWARN_UNUSED(interp);
-  register cli_ArgvInfo *infoPtr;
+  cli_ArgvInfo *infoPtr;
   cli_ArgvInfo *argTable = commandInfo->argtable;
   int width, numSpaces;
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0f171d33/plugins/experimental/hipes/hipes.cc
----------------------------------------------------------------------
diff --git a/plugins/experimental/hipes/hipes.cc b/plugins/experimental/hipes/hipes.cc
index fadd594..085fc14 100644
--- a/plugins/experimental/hipes/hipes.cc
+++ b/plugins/experimental/hipes/hipes.cc
@@ -67,7 +67,7 @@ escapify_url(const char *src, int src_len, char* dst, int dst_len)
     return -1;
 
   while (from < (src + src_len)) {
-    register unsigned char c = *from;
+    unsigned char c = *from;
 
     if (len >= dst_len)
       return -1; // Does not fit.... abort!

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0f171d33/proxy/logging/LogAccess.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogAccess.cc b/proxy/logging/LogAccess.cc
index f1af9c8..8dabf52 100644
--- a/proxy/logging/LogAccess.cc
+++ b/proxy/logging/LogAccess.cc
@@ -653,8 +653,8 @@ LogAccess::marshal_record(char *record, char *buf)
   ink_debug_assert(::strlen(record_not_found_msg) + 1 == record_not_found_chars);
 
   char ascii_buf[max_chars];
-  register const char *out_buf;
-  register unsigned int num_chars;
+  const char *out_buf;
+  unsigned int num_chars;
 
 #define LOG_INTEGER RECD_INT
 #define LOG_COUNTER RECD_COUNTER

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0f171d33/proxy/logging/LogFieldAliasMap.h
----------------------------------------------------------------------
diff --git a/proxy/logging/LogFieldAliasMap.h b/proxy/logging/LogFieldAliasMap.h
index 7929c71..0905826 100644
--- a/proxy/logging/LogFieldAliasMap.h
+++ b/proxy/logging/LogFieldAliasMap.h
@@ -168,7 +168,7 @@ public:
     size_t i = key - m_min;
     if (m_entries && key >= m_min && key <= m_max && m_table[i].valid)
     {
-      register size_t l = m_table[i].length;
+      size_t l = m_table[i].length;
       if (l < bufLen)
       {
         ink_strlcpy(buf, m_table[key - m_min].name, bufLen);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0f171d33/proxy/logging/LogUtils.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogUtils.cc b/proxy/logging/LogUtils.cc
index f8e3376..aacec71 100644
--- a/proxy/logging/LogUtils.cc
+++ b/proxy/logging/LogUtils.cc
@@ -335,7 +335,7 @@ LogUtils::escapify_url(Arena *arena, char *url, size_t len_in, int *len_out, cha
   char *in_url_end = url + len_in;
 
   while (p < in_url_end) {
-    register unsigned char c = *p;
+    unsigned char c = *p;
     if (map[c / 8] & (1 << (7 - c % 8))) {
       ++count;
     }
@@ -380,7 +380,7 @@ LogUtils::escapify_url(Arena *arena, char *url, size_t len_in, int *len_out, cha
   char *to = new_url;
 
   while (from < in_url_end) {
-    register unsigned char c = *from;
+    unsigned char c = *from;
     if (map[c / 8] & (1 << (7 - c % 8))) {
       *to++ = '%';
       *to++ = hex_digit[c / 16];

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0f171d33/tools/http_load/http_load.c
----------------------------------------------------------------------
diff --git a/tools/http_load/http_load.c b/tools/http_load/http_load.c
index 229320a..4e7b31a 100644
--- a/tools/http_load/http_load.c
+++ b/tools/http_load/http_load.c
@@ -1253,7 +1253,7 @@ handle_read(int cnum, struct timeval *nowP)
   int bytes_to_read, bytes_read, bytes_handled;
   float elapsed;
   ClientData client_data;
-  register long checksum;
+  long checksum;
 
   tmr_reset(nowP, connections[cnum].idle_timer);
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0f171d33/tools/http_load/timers.c
----------------------------------------------------------------------
diff --git a/tools/http_load/timers.c b/tools/http_load/timers.c
index e8d7f37..b9c1909 100644
--- a/tools/http_load/timers.c
+++ b/tools/http_load/timers.c
@@ -58,8 +58,8 @@ static void
 l_add(Timer * t)
 {
   int h = t->hash;
-  register Timer *t2;
-  register Timer *t2prev;
+  Timer *t2;
+  Timer *t2prev;
 
   t2 = timers[h];
   if (t2 == (Timer *) 0) {
@@ -193,7 +193,7 @@ tmr_mstimeout(struct timeval *nowP)
     int h;
     int gotone;
     long msecs, m;
-    register Timer *t;
+    Timer *t;
 
     gotone = 0;
     msecs = 0;                  /* make lint happy */


Re: git commit: TS-1662 Remove use of register storage class

Posted by Leif Hedstrom <zw...@apache.org>.
On 4/18/13 3:18 AM, Igor Galić wrote:
> asMap.h    |    2 +-
>   proxy/logging/LogUtils.cc           |    4 ++--
>   tools/http_load/http_load.c         |    2 +-
>   tools/http_load/timers.c            |    6 +++---
>   13 files changed, 30 insertions(+), 28 deletions(-)
> ----------------------------------------------------------------------
> This code doesn't touch anything that uses "__register" instead of "register"
> Can someone please enlighten me as to what the difference is between those?
>

I'm not seeing it, what am I missing?

-- Leif


Re: git commit: TS-1662 Remove use of register storage class

Posted by Igor Galić <i....@brainsware.org>.

----- Original Message -----
> Updated Branches:
>   refs/heads/master 1d4ce3fa3 -> 0f171d335
> 
> 
> TS-1662 Remove use of register storage class
[snip] 
> ----------------------------------------------------------------------
>  CHANGES                             |    2 ++
>  lib/ts/ink_res_init.cc              |    6 +++---
>  lib/ts/ink_res_mkquery.cc           |    6 +++---
>  lib/ts/ink_resolver.h               |   12 ++++++------
>  lib/ts/ink_string.cc                |    4 ++--
>  lib/ts/ink_string.h                 |    6 +++---
>  mgmt/cli/cliParseArg.cc             |    2 +-
>  plugins/experimental/hipes/hipes.cc |    2 +-
>  proxy/logging/LogAccess.cc          |    4 ++--
>  proxy/logging/LogFieldAliasMap.h    |    2 +-
>  proxy/logging/LogUtils.cc           |    4 ++--
>  tools/http_load/http_load.c         |    2 +-
>  tools/http_load/timers.c            |    6 +++---
>  13 files changed, 30 insertions(+), 28 deletions(-)
> ----------------------------------------------------------------------

This code doesn't touch anything that uses "__register" instead of "register"
Can someone please enlighten me as to what the difference is between those? 

-- 
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515  2EA5 4B1D 9E08 A097 C9AE