INN commit: trunk (5 files)

INN Commit rra at isc.org
Sun May 24 13:59:16 UTC 2015


    Date: Sunday, May 24, 2015 @ 06:59:15
  Author: iulius
Revision: 9877

Use a preprocessor symbol to make the initialization of ARTHANDLE structs easier

Modified:
  trunk/contrib/respool.c
  trunk/frontends/sm.c
  trunk/include/inn/storage.h
  trunk/innd/art.c
  trunk/tests/overview/xref-t.c

-------------------------+
 contrib/respool.c       |    2 +-
 frontends/sm.c          |    2 +-
 include/inn/storage.h   |    3 +++
 innd/art.c              |    2 +-
 tests/overview/xref-t.c |    2 +-
 5 files changed, 7 insertions(+), 4 deletions(-)

Modified: contrib/respool.c
===================================================================
--- contrib/respool.c	2015-05-23 13:11:16 UTC (rev 9876)
+++ contrib/respool.c	2015-05-24 13:59:15 UTC (rev 9877)
@@ -26,7 +26,7 @@
     char *tokenptr;
     int len;
     ARTHANDLE *art;
-    ARTHANDLE newart = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+    ARTHANDLE newart = ARTHANDLE_INITIALIZER;
     TOKEN token, newtoken;
     char *arttmp;
 

Modified: frontends/sm.c
===================================================================
--- frontends/sm.c	2015-05-23 13:11:16 UTC (rev 9876)
+++ frontends/sm.c	2015-05-24 13:59:15 UTC (rev 9877)
@@ -58,7 +58,7 @@
     struct buffer *article;
     size_t size;
     char *text, *start, *end;
-    ARTHANDLE handle = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+    ARTHANDLE handle = ARTHANDLE_INITIALIZER;
     TOKEN token;
 
     /* Build the basic article handle. */

Modified: include/inn/storage.h
===================================================================
--- include/inn/storage.h	2015-05-23 13:11:16 UTC (rev 9876)
+++ include/inn/storage.h	2015-05-24 13:59:15 UTC (rev 9877)
@@ -46,6 +46,9 @@
   TOKEN          *token;     /* A pointer to the article's TOKEN */
 } ARTHANDLE;
 
+/* Initializer for the ARTHANDLE structure. */
+#define ARTHANDLE_INITIALIZER { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+
 #define SMERR_NOERROR          0
 #define SMERR_INTERNAL         1
 #define SMERR_UNDEFINED        2

Modified: innd/art.c
===================================================================
--- innd/art.c	2015-05-23 13:11:16 UTC (rev 9876)
+++ innd/art.c	2015-05-24 13:59:15 UTC (rev 9877)
@@ -445,7 +445,7 @@
   ARTDATA	*data = &cp->Data;
   HDRCONTENT	*hc = data->HdrContent;
   const char	*p;
-  ARTHANDLE	arth = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+  ARTHANDLE	arth = ARTHANDLE_INITIALIZER;
   int		i, j, iovcnt = 0;
   long		headersize = 0;
   TOKEN		result;

Modified: tests/overview/xref-t.c
===================================================================
--- tests/overview/xref-t.c	2015-05-23 13:11:16 UTC (rev 9876)
+++ tests/overview/xref-t.c	2015-05-24 13:59:15 UTC (rev 9877)
@@ -184,7 +184,7 @@
     bool value;
     char *article, *wire;
     size_t size;
-    ARTHANDLE handle = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+    ARTHANDLE handle = ARTHANDLE_INITIALIZER;
     TOKEN token;
 
     if (access("../data/overview/xref", F_OK) == 0)



More information about the inn-committers mailing list