浏览代码

Cleanup EOL whitespace

Richard Laager 10 年之前
父节点
当前提交
0599fb27b7
共有 8 个文件被更改,包括 86 次插入86 次删除
  1. 1 1
      .travis.yml
  2. 1 1
      AUTHORS
  3. 62 62
      ChangeLog
  4. 1 1
      INSTALL
  5. 5 5
      configure.in
  6. 1 1
      src/docsis.c
  7. 4 4
      src/docsis_decode.c
  8. 11 11
      src/docsis_encode.c

+ 1 - 1
.travis.yml

@@ -6,7 +6,7 @@ before_install:
   - sudo pip install cpp-coveralls
   - sudo pip install cpp-coveralls
   - ./autogen.sh
   - ./autogen.sh
 
 
-script: 
+script:
   - ./configure CFLAGS='-g -O0 -fprofile-arcs -ftest-coverage'
   - ./configure CFLAGS='-g -O0 -fprofile-arcs -ftest-coverage'
   - make && sudo make install
   - make && sudo make install
   - cd tests/
   - cd tests/

+ 1 - 1
AUTHORS

@@ -2,7 +2,7 @@ Adrian Simionov <daniel.simionov@gmail.com>
 Cornel Ciocirlan <ctrl@users.sourceforge.net>
 Cornel Ciocirlan <ctrl@users.sourceforge.net>
 The Evvolve Team <docsis@evvolve.com>
 The Evvolve Team <docsis@evvolve.com>
 
 
-Help and feedback received from: 
+Help and feedback received from:
 
 
 Ronald Rosenfeld
 Ronald Rosenfeld
 Adrian Kwong
 Adrian Kwong

+ 62 - 62
ChangeLog

@@ -8,55 +8,55 @@ version 0.9.6 (06/14/2010):
 	* Work properly on 64-bit systems (Oliver Hitz, James Flemer)
 	* Work properly on 64-bit systems (Oliver Hitz, James Flemer)
 	* Various cleanups to the code, documentation, and build setup
 	* Various cleanups to the code, documentation, and build setup
 
 
-0.9.5			- allow semi-colon characters in strings 
-ctrl			- add support for TimeTicks SNMP encoding. 
-			- simplify and improve parser (it now returns a 
+0.9.5			- allow semi-colon characters in strings
+ctrl			- add support for TimeTicks SNMP encoding.
+			- simplify and improve parser (it now returns a
 		          "parse tree")
 		          "parse tree")
-			- add support for ManufacturerCVC and CoSignerCVC 
-			  (reading files directly) 		
+			- add support for ManufacturerCVC and CoSignerCVC
+			  (reading files directly)
 			- print warning if TLV64 present in DOCSIS config files
 			- print warning if TLV64 present in DOCSIS config files
 			- multiple file encoding in one pass (preliminary)
 			- multiple file encoding in one pass (preliminary)
-			  Performance: up to 200 files / second 
-			- Support Gauge32 and Counter32. Unsigned32 gets 
-			  encoded as a Gauge32 as well. 
+			  Performance: up to 200 files / second
+			- Support Gauge32 and Counter32. Unsigned32 gets
+			  encoded as a Gauge32 as well.
 
 
 0.9.4			- fix parsing of square brackets in string OID labels
 0.9.4			- fix parsing of square brackets in string OID labels
 evvolve			- close the file descriptor in parse_config_file
 evvolve			- close the file descriptor in parse_config_file
 ctrl			- re-work of decoding infrastructure for CableHome
 ctrl			- re-work of decoding infrastructure for CableHome
 
 
-0.9.3			- update CMTS MIC calculation per DOCSIS 2.0 (added 
+0.9.3			- update CMTS MIC calculation per DOCSIS 2.0 (added
 evvolve			  SubMgmt settings to CMTS MIC calculation)
 evvolve			  SubMgmt settings to CMTS MIC calculation)
 ctrl			- fix decoding of long Strings in SNMP Objects
 ctrl			- fix decoding of long Strings in SNMP Objects
-ctrl			- add support for long Variable Bindings (>127) 
-ctrl			- add support for TLV64 encode/decode for long SNMP 
+ctrl			- add support for long Variable Bindings (>127)
+ctrl			- add support for TLV64 encode/decode for long SNMP
 ctrl			  Objects.
 ctrl			  Objects.
 evvolve			- add support for Downstream Channel List TLVs
 evvolve			- add support for Downstream Channel List TLVs
 evvolve			- add support for TftpModemAddress and TftpTimeout TLVs
 evvolve			- add support for TftpModemAddress and TftpTimeout TLVs
-ctrl			- make GenericTLVs easier to decode/encode when 
+ctrl			- make GenericTLVs easier to decode/encode when
 ctrl			  printable strings are used
 ctrl			  printable strings are used
-ctrl			  
+ctrl
 ctrl			- fixed memory leaks (for the sake of it)
 ctrl			- fixed memory leaks (for the sake of it)
-			  
-			
-0.9.2			- add support for ObjectID variable bindings 
+
+
+0.9.2			- add support for ObjectID variable bindings
 evvolve			- fix bug when writing files on Win32
 evvolve			- fix bug when writing files on Win32
 			- fix the docsis_code for subscriber management filters
 			- fix the docsis_code for subscriber management filters
 
 
 
 
-0.9.1			- add support for ModemCapabilities 
+0.9.1			- add support for ModemCapabilities
 evvolve			- add support for Subscriber Management Filter groups
 evvolve			- add support for Subscriber Management Filter groups
-			- make SNMP VarBind encoding more "compatible" with 
+			- make SNMP VarBind encoding more "compatible" with
 			  other encoders
 			  other encoders
 			- cleanup argument handling, fix bug with error printing
 			- cleanup argument handling, fix bug with error printing
 			- fix bug where SnmpMibObject OID output would switch to
 			- fix bug where SnmpMibObject OID output would switch to
-			  numeric format after a decode_oid 
+			  numeric format after a decode_oid
 			- re-organized and beautified source code
 			- re-organized and beautified source code
-			  
+
 
 
 0.9.0			- fix range of MaxCPE (1-254)
 0.9.0			- fix range of MaxCPE (1-254)
 evvolve			- add support for Win32 with Cygwin
 evvolve			- add support for Win32 with Cygwin
 			- fix ReAuthTimeout upper limit (30)
 			- fix ReAuthTimeout upper limit (30)
-			- add script to generate HTML help from 
+			- add script to generate HTML help from
 			  the symbol table
 			  the symbol table
 			- add NSIS packaging script for Win32
 			- add NSIS packaging script for Win32
 			- added configure script, re-organized stuff
 			- added configure script, re-organized stuff
@@ -65,26 +65,26 @@ evvolve			- add support for Win32 with Cygwin
 0.8.8  02/07/03		- fix handling of label-hinted suffix to OIDs
 0.8.8  02/07/03		- fix handling of label-hinted suffix to OIDs
 evvolve			- check for string length overflow while parsing
 evvolve			- check for string length overflow while parsing
 			- added mibs to distribution
 			- added mibs to distribution
-			- change SNMPv3* labels to SNMP* 
+			- change SNMPv3* labels to SNMP*
 			- add Docsis20Enable configuration setting
 			- add Docsis20Enable configuration setting
 			- complete support for SnmpV3NotificationReceiver
 			- complete support for SnmpV3NotificationReceiver
-	
-Many thanks to Rudy Zijlstra for pointing out a few bugs. 
+
+Many thanks to Rudy Zijlstra for pointing out a few bugs.
 
 
 0.8.7  20/6/03		- fix bug with encoding HexStrings with trailing zeros
 0.8.7  20/6/03		- fix bug with encoding HexStrings with trailing zeros
 Ronald Rosenfeld	- fix double declaration of symbol T_MAC
 Ronald Rosenfeld	- fix double declaration of symbol T_MAC
-			- add support for negative integers 
-evvolve			- change -lcrypto to -lcrypt to make default 
+			- add support for negative integers
+evvolve			- change -lcrypto to -lcrypt to make default
 			  more "mainstream".
 			  more "mainstream".
 			- add support for ASN_GAUGE encodings
 			- add support for ASN_GAUGE encodings
 			- fix VendorSpecific decoding
 			- fix VendorSpecific decoding
 			- print label as comment for enums
 			- print label as comment for enums
 
 
-Many thanks to Ronald Rosenfeld for sending in three patches. 
+Many thanks to Ronald Rosenfeld for sending in three patches.
 
 
-0.8.6  31/05/03		- add support for SNMPv3Kickstart and 
+0.8.6  31/05/03		- add support for SNMPv3Kickstart and
 evvolve		  	  partial support for SNMPv3 Notification Receiver
 evvolve		  	  partial support for SNMPv3 Notification Receiver
-			- fix compilation warnings 
+			- fix compilation warnings
 			- add support for PHS Rule (untested)
 			- add support for PHS Rule (untested)
 			- cleanup indexes in docsis_symtable.h
 			- cleanup indexes in docsis_symtable.h
 			- add regression test script
 			- add regression test script
@@ -98,53 +98,53 @@ ctrl			- added support for VendorSpecific TLVs
 evvolve			- Updated OID format to accept "-" and "_" in labels
 evvolve			- Updated OID format to accept "-" and "_" in labels
 ctrl			- We can now encode decoded files directly !
 ctrl			- We can now encode decoded files directly !
 akwong			  (thanks to help from Adrian Kwong)
 akwong			  (thanks to help from Adrian Kwong)
-			- MIB output format changed. 
-			- NET-SNMP 5.x support. 
-			- Dropped support for ucd-snmp. 
-			- Made SNMP decoding smarter - i.e. output OID	
-			  suffix only; but switch to full-OID output 
-			  if MIBs are not installed. 
-			- Hacked support for encoding MTA configuration files. 
+			- MIB output format changed.
+			- NET-SNMP 5.x support.
+			- Dropped support for ucd-snmp.
+			- Made SNMP decoding smarter - i.e. output OID
+			  suffix only; but switch to full-OID output
+			  if MIBs are not installed.
+			- Hacked support for encoding MTA configuration files.
 			- Added support for Vendor Specific info.
 			- Added support for Vendor Specific info.
-			- Worked around string formatting issues in NET-SNMP. 
+			- Worked around string formatting issues in NET-SNMP.
 			- Added indent functionality.
 			- Added indent functionality.
 evvolve
 evvolve
 0.7.4  18/02/02		Fix condition too strong in docsis_decode.c.
 0.7.4  18/02/02		Fix condition too strong in docsis_decode.c.
-evvolve			
+evvolve
 
 
-0.7.3  16/02/02		Change symbols so that {symbol_name,docsis_code} is 
+0.7.3  16/02/02		Change symbols so that {symbol_name,docsis_code} is
 evvolve			"primary key" (the above pairs are unique in the
 evvolve			"primary key" (the above pairs are unique in the
 			entire symbol table).
 			entire symbol table).
 			Fix errors with IpTos encoding (still buggy)
 			Fix errors with IpTos encoding (still buggy)
 			We took over full maintainership from Cornel.
 			We took over full maintainership from Cornel.
 
 
 0.7.2  12/02/02		Fix typos in docsis_symtable.h
 0.7.2  12/02/02		Fix typos in docsis_symtable.h
-evvolve			
+evvolve
 
 
-0.7.1  08/02/02		Split encoding functions into docsis_encode.{h,c}	
+0.7.1  08/02/02		Split encoding functions into docsis_encode.{h,c}
 evvolve			Implemented Hex String and Ether+Ethermask encoders.
 evvolve			Implemented Hex String and Ether+Ethermask encoders.
 			Implemented range checking for string and hex string
 			Implemented range checking for string and hex string
 			encoders.
 			encoders.
-			We added many DOCSIS 1.1 configuration settings to 
+			We added many DOCSIS 1.1 configuration settings to
  			docsis_symtable.h. Got bored, so if you want more please
  			docsis_symtable.h. Got bored, so if you want more please
 			add them yourself and send us a patch.
 			add them yourself and send us a patch.
 			Updated CMTS MIC calculation to use the new 1.1 config
 			Updated CMTS MIC calculation to use the new 1.1 config
-			settings in addition to the 1.0 ones (as per the 
-			latest DOCSIS RFI). 
+			settings in addition to the 1.0 ones (as per the
+			latest DOCSIS RFI).
 
 
-0.7.0  06/02/02		New "decoding" framework similar to the encoding 
-evvolve			framework makes adding new "symbols" as easy as 
- 			editing the "docsis_symtable.h" file. 
+0.7.0  06/02/02		New "decoding" framework similar to the encoding
+evvolve			framework makes adding new "symbols" as easy as
+ 			editing the "docsis_symtable.h" file.
 			As an example, support for the DOCSIS 1.1 Downstream
 			As an example, support for the DOCSIS 1.1 Downstream
-			Packet Classifiers was added. 
-			Bugs were found and some were even fixed in the 
-			process. 
-			Started adding 1.1 stuff to the project. 
+			Packet Classifiers was added.
+			Bugs were found and some were even fixed in the
+			process.
+			Started adding 1.1 stuff to the project.
 
 
-0.6.2: 18/07/01		
+0.6.2: 18/07/01
 ctrl			Make the thing compile on Solaris (Makefile.solaris)
 ctrl			Make the thing compile on Solaris (Makefile.solaris)
 			Fix memory alignment errors on Solaris
 			Fix memory alignment errors on Solaris
-			Updated MD5 implementation to get rid of annoying 
+			Updated MD5 implementation to get rid of annoying
 			warnings
 			warnings
 
 
 0.6.1:  25/03/01
 0.6.1:  25/03/01
@@ -152,31 +152,31 @@ ctrl			added -lcrypto to $LIBS to work with ucd-snmp-4.2
 			cleaned up the sourcecode a bit
 			cleaned up the sourcecode a bit
 			added support for "decoding" a binary file
 			added support for "decoding" a binary file
 			fixed bug in decoding unsigned shorts (MaxBurstUp)
 			fixed bug in decoding unsigned shorts (MaxBurstUp)
-			
 
 
-0.6.0:	23/03/01	
+
+0.6.0:	23/03/01
 ctrl			added support for generic hexadecimal strings
 ctrl			added support for generic hexadecimal strings
 			(needed for docsDevNmAccessInterfaces)
 			(needed for docsDevNmAccessInterfaces)
 
 
 			fixed bug involving multiple String-type SNMP vars
 			fixed bug involving multiple String-type SNMP vars
 			in the same config file (uninitialized buffer)
 			in the same config file (uninitialized buffer)
 
 
-			fixed bug with CpeMacAddress decoding (introduced in 
+			fixed bug with CpeMacAddress decoding (introduced in
 			0.5.8)
 			0.5.8)
 
 
-0.5.8: 
-ctrl	18/03/01:	various re-organizations 
+0.5.8:
+ctrl	18/03/01:	various re-organizations
 			released to sourceforge
 			released to sourceforge
 
 
-0.5.7: 
-ctrl	17/03/01: 
-			fixed bug in CPE MAC Address encoding (correct 
+0.5.7:
+ctrl	17/03/01:
+			fixed bug in CPE MAC Address encoding (correct
 			type = 14)
 			type = 14)
 			added "support" for config files in DOS-format text
 			added "support" for config files in DOS-format text
 
 
 0.5.5:
 0.5.5:
 ctrl
 ctrl
-	01/12/00: 	created CHANGES file	
+	01/12/00: 	created CHANGES file
 		 	various small annoyances resolved
 		 	various small annoyances resolved
 	  		added support for CPE MAC Address configuration setting
 	  		added support for CPE MAC Address configuration setting
 			removed references to _A*_H in *.h
 			removed references to _A*_H in *.h

+ 1 - 1
INSTALL

@@ -40,7 +40,7 @@ The simplest way to compile this package is:
      documentation.
      documentation.
 
 
   4. You can remove the program binaries and object files from the
   4. You can remove the program binaries and object files from the
-     source code directory by typing `make clean'.  
+     source code directory by typing `make clean'.
 
 
 Compilers and Options
 Compilers and Options
 =====================
 =====================

+ 5 - 5
configure.in

@@ -24,7 +24,7 @@ else
   fi
   fi
 fi
 fi
 
 
-dnl check for bison, yacc won't help; 
+dnl check for bison, yacc won't help;
 
 
 AC_PATH_PROG([BISON], [bison], [notfound],
 AC_PATH_PROG([BISON], [bison], [notfound],
                    [$PATH:${prefix}/bin:${exec_prefix}/bin:/usr/freeware/bin:/usr/gnu/bin:/usr/local/bin:/usr/bin])
                    [$PATH:${prefix}/bin:${exec_prefix}/bin:/usr/freeware/bin:/usr/gnu/bin:/usr/local/bin:/usr/bin])
@@ -95,12 +95,12 @@ AC_COMPILE_IFELSE(
                    [[netsnmp_init_mib();]])],
                    [[netsnmp_init_mib();]])],
   [AC_DEFINE_UNQUOTED(HAVE_NETSNMP_INIT_MIB, 1, [Defines if your net-snmp has the netsnmp_init_mib function])])
   [AC_DEFINE_UNQUOTED(HAVE_NETSNMP_INIT_MIB, 1, [Defines if your net-snmp has the netsnmp_init_mib function])])
 
 
-dnl end libnetsnmp check 
+dnl end libnetsnmp check
 
 
-dnl check for Cygwin & NSIS to build docsis_setup.exe 
+dnl check for Cygwin & NSIS to build docsis_setup.exe
 
 
 AC_MSG_CHECKING([for Cygwin])
 AC_MSG_CHECKING([for Cygwin])
-if test "x$host_os" = "xcygwin" ; then 
+if test "x$host_os" = "xcygwin" ; then
 	AC_MSG_RESULT([ found Cygwin, trying to use NSIS to build setup.exe ])
 	AC_MSG_RESULT([ found Cygwin, trying to use NSIS to build setup.exe ])
 dnl save current path in DOS format so we can substitute it in in NSIS setup script
 dnl save current path in DOS format so we can substitute it in in NSIS setup script
 	CYGWIN_BUILDROOT=`cygpath -w $PWD`
 	CYGWIN_BUILDROOT=`cygpath -w $PWD`
@@ -112,7 +112,7 @@ dnl save current path in DOS format so we can substitute it in in NSIS setup scr
 	AC_PATH_PROG([MAKENSIS], [makensis], [notfound],[$PATH:$prefix/bin:/cygdrive/c/Program Files/NSIS])
 	AC_PATH_PROG([MAKENSIS], [makensis], [notfound],[$PATH:$prefix/bin:/cygdrive/c/Program Files/NSIS])
 	if test "x$MAKENSIS" = "xnotfound"; then
 	if test "x$MAKENSIS" = "xnotfound"; then
 		AC_MSG_RESULT([makensis not found, no setup.exe...])
 		AC_MSG_RESULT([makensis not found, no setup.exe...])
-	else 
+	else
 		AC_MSG_RESULT([found makensis at $MAKENSIS ... ])
 		AC_MSG_RESULT([found makensis at $MAKENSIS ... ])
 	fi
 	fi
 else
 else

+ 1 - 1
src/docsis.c

@@ -235,7 +235,7 @@ main (int argc, char *argv[])
                 output_file = argv[6];
                 output_file = argv[6];
 	} else {
 	} else {
                 usage();
                 usage();
-        }	
+        }
   } else {
   } else {
   	switch (argc)
   	switch (argc)
     	{
     	{

+ 4 - 4
src/docsis_decode.c

@@ -113,7 +113,7 @@ void decode_ip_list (unsigned char *tlvbuf, symbol_type *sym, size_t length )
       printf(",");
       printf(",");
     }
     }
   }
   }
-  printf(";\n");  
+  printf(";\n");
 }
 }
 
 
 void decode_ip6 (unsigned char *tlvbuf, symbol_type *sym, size_t length )
 void decode_ip6 (unsigned char *tlvbuf, symbol_type *sym, size_t length )
@@ -143,7 +143,7 @@ void decode_ip6_list (unsigned char *tlvbuf, symbol_type *sym, size_t length )
       printf(",");
       printf(",");
     }
     }
   }
   }
-  printf(";\n");  
+  printf(";\n");
 }
 }
 
 
 void decode_ip6_prefix_list (unsigned char *tlvbuf, symbol_type *sym, size_t length )
 void decode_ip6_prefix_list (unsigned char *tlvbuf, symbol_type *sym, size_t length )
@@ -158,7 +158,7 @@ void decode_ip6_prefix_list (unsigned char *tlvbuf, symbol_type *sym, size_t len
       printf(",");
       printf(",");
     }
     }
   }
   }
-  printf(";\n");  
+  printf(";\n");
 }
 }
 
 
 void decode_ip_ip6 (unsigned char *tlvbuf, symbol_type *sym, size_t length )
 void decode_ip_ip6 (unsigned char *tlvbuf, symbol_type *sym, size_t length )
@@ -549,7 +549,7 @@ void decode_main_aggregate (unsigned char *tlvbuf, size_t buflen)
 		decode_unknown(cp, NULL, (size_t) cp[1] );
 		decode_unknown(cp, NULL, (size_t) cp[1] );
   	} else {
   	} else {
       		current_symbol->decode_func (cp+1+tlv_llen, current_symbol, tlv_vlen );
       		current_symbol->decode_func (cp+1+tlv_llen, current_symbol, tlv_vlen );
-  	} 
+  	}
 #ifdef DEBUG
 #ifdef DEBUG
 	if (cp[0] == 64 )   /* TLV 64 has length encoded as a short */
 	if (cp[0] == 64 )   /* TLV 64 has length encoded as a short */
 	   printf("/* TLV 64, size %hu */ \n", ntohs(*((unsigned short *)(cp+1))) );
 	   printf("/* TLV 64, size %hu */ \n", ntohs(*((unsigned short *)(cp+1))) );

+ 11 - 11
src/docsis_encode.c

@@ -77,7 +77,7 @@ int encode_uint24 ( unsigned char *buf, void *tval, struct symbol_entry *sym_ptr
   union t_val *helper; /* We only use this to cast the void* we receive to what we think it should be */
   union t_val *helper; /* We only use this to cast the void* we receive to what we think it should be */
 
 
   helper = (union t_val *) tval;
   helper = (union t_val *) tval;
-  
+
   byte1 = (helper->uintval >> (0)) & 0xFF;
   byte1 = (helper->uintval >> (0)) & 0xFF;
   byte2 = (helper->uintval >> (8)) & 0xFF;
   byte2 = (helper->uintval >> (8)) & 0xFF;
   byte3 = (helper->uintval >> (16)) & 0xFF;
   byte3 = (helper->uintval >> (16)) & 0xFF;
@@ -191,7 +191,7 @@ int encode_ip_list( unsigned char *buf, void *tval, struct symbol_entry *sym_ptr
   helper = (union t_val *) tval;
   helper = (union t_val *) tval;
   i = 0;
   i = 0;
   token = strtok(helper->strval, s);
   token = strtok(helper->strval, s);
-  while (token != NULL) 
+  while (token != NULL)
   {
   {
     array[i] = token;
     array[i] = token;
     token = strtok (NULL, s);
     token = strtok (NULL, s);
@@ -248,7 +248,7 @@ int encode_ip6_list( unsigned char *buf, void *tval, struct symbol_entry *sym_pt
   helper = (union t_val *) tval;
   helper = (union t_val *) tval;
   i = 0;
   i = 0;
   token = strtok(helper->strval, s);
   token = strtok(helper->strval, s);
-  while (token != NULL) 
+  while (token != NULL)
   {
   {
     array[i] = token;
     array[i] = token;
     token = strtok (NULL, s);
     token = strtok (NULL, s);
@@ -313,7 +313,7 @@ int encode_ip_ip6( unsigned char *buf, void *tval, struct symbol_entry *sym_ptr
   } else if ( inet_aton ( helper->strval, &in) ) {
   } else if ( inet_aton ( helper->strval, &in) ) {
     memcpy ( buf, &in, sizeof(struct in_addr));
     memcpy ( buf, &in, sizeof(struct in_addr));
     free(helper->strval);
     free(helper->strval);
-    return ( sizeof(struct in_addr));    
+    return ( sizeof(struct in_addr));
   } else {
   } else {
     fprintf(stderr, "Invalid IP address %s at line %d\n", helper->strval, line );
     fprintf(stderr, "Invalid IP address %s at line %d\n", helper->strval, line );
     exit (-1);
     exit (-1);
@@ -325,7 +325,7 @@ int encode_char_ip_ip6( unsigned char *buf, void *tval, struct symbol_entry *sym
   struct in6_addr in6;
   struct in6_addr in6;
   struct in_addr in;
   struct in_addr in;
   union t_val *helper; /* We only use this to cast the void* we receive to what we think it should be */
   union t_val *helper; /* We only use this to cast the void* we receive to what we think it should be */
-  
+
   char ipv4 = 1;
   char ipv4 = 1;
   char ipv6 = 2;
   char ipv6 = 2;
 
 
@@ -340,7 +340,7 @@ int encode_char_ip_ip6( unsigned char *buf, void *tval, struct symbol_entry *sym
     memcpy ( buf, &ipv4, sizeof(char) );
     memcpy ( buf, &ipv4, sizeof(char) );
     memcpy ( buf + 1, &in, sizeof(struct in_addr));
     memcpy ( buf + 1, &in, sizeof(struct in_addr));
     free(helper->strval);
     free(helper->strval);
-    return ( sizeof(char) + sizeof(struct in_addr));    
+    return ( sizeof(char) + sizeof(struct in_addr));
   } else {
   } else {
     fprintf(stderr, "Invalid IP address %s at line %d\n", helper->strval, line );
     fprintf(stderr, "Invalid IP address %s at line %d\n", helper->strval, line );
     exit (-1);
     exit (-1);
@@ -356,11 +356,11 @@ int encode_ip_ip6_port( unsigned char *buf, void *tval, struct symbol_entry *sym
   char *token;
   char *token;
   char *array[2];
   char *array[2];
   const char s[2] = "/";
   const char s[2] = "/";
-  
+
   union t_val *helper; /* We only use this to cast the void* we receive to what we think it should be */
   union t_val *helper; /* We only use this to cast the void* we receive to what we think it should be */
-  
+
   helper = (union t_val *) tval;
   helper = (union t_val *) tval;
-  
+
   i = 0;
   i = 0;
   token = strtok(helper->strval, s);
   token = strtok(helper->strval, s);
   while (token != NULL)
   while (token != NULL)
@@ -369,7 +369,7 @@ int encode_ip_ip6_port( unsigned char *buf, void *tval, struct symbol_entry *sym
     token = strtok (NULL, s);
     token = strtok (NULL, s);
   }
   }
   port = htons(atoi(array[1]));
   port = htons(atoi(array[1]));
-  
+
   if ( inet_pton(AF_INET6, array[0], &in6) ) {
   if ( inet_pton(AF_INET6, array[0], &in6) ) {
     memcpy ( buf, &in6, sizeof(struct in6_addr));
     memcpy ( buf, &in6, sizeof(struct in6_addr));
     memcpy ( buf + sizeof(struct in6_addr),&port,sizeof(unsigned short));
     memcpy ( buf + sizeof(struct in6_addr),&port,sizeof(unsigned short));
@@ -379,7 +379,7 @@ int encode_ip_ip6_port( unsigned char *buf, void *tval, struct symbol_entry *sym
     memcpy ( buf, &in, sizeof(struct in_addr));
     memcpy ( buf, &in, sizeof(struct in_addr));
     memcpy ( buf + sizeof(struct in_addr),&port,sizeof(unsigned short));
     memcpy ( buf + sizeof(struct in_addr),&port,sizeof(unsigned short));
     free(helper->strval);
     free(helper->strval);
-    return ( sizeof(struct in_addr) + sizeof(unsigned short));    
+    return ( sizeof(struct in_addr) + sizeof(unsigned short));
   } else {
   } else {
     fprintf(stderr, "Invalid IP address / port combination %s at line %d\n", helper->strval, line );
     fprintf(stderr, "Invalid IP address / port combination %s at line %d\n", helper->strval, line );
     exit (-1);
     exit (-1);