diff options
author | Jörg Mayer <jmayer@loplof.de> | 2002-08-28 20:41:00 +0000 |
---|---|---|
committer | Jörg Mayer <jmayer@loplof.de> | 2002-08-28 20:41:00 +0000 |
commit | 48be4e530d6635dbf1ef1dafa984c2060f3caa8a (patch) | |
tree | fc136de37c7e939ec0c5fc83dbf48297b9650816 /epan/osi-utils.c | |
parent | 64b6acac6dae4c18aa1aebf368923c4bef8ed221 (diff) | |
download | wireshark-48be4e530d6635dbf1ef1dafa984c2060f3caa8a.tar.gz wireshark-48be4e530d6635dbf1ef1dafa984c2060f3caa8a.tar.bz2 wireshark-48be4e530d6635dbf1ef1dafa984c2060f3caa8a.zip |
Removed trailing whitespaces from .h and .c files using the
winapi_cleanup tool written by Patrik Stridvall for the wine
project.
svn path=/trunk/; revision=6116
Diffstat (limited to 'epan/osi-utils.c')
-rw-r--r-- | epan/osi-utils.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/epan/osi-utils.c b/epan/osi-utils.c index f1ac5dc276..b61b2dd176 100644 --- a/epan/osi-utils.c +++ b/epan/osi-utils.c @@ -2,7 +2,7 @@ * Routines for ISO/OSI network and transport protocol packet disassembly * Main entrance point and common functions * - * $Id: osi-utils.c,v 1.7 2002/08/02 21:29:39 jmayer Exp $ + * $Id: osi-utils.c,v 1.8 2002/08/28 20:40:44 jmayer Exp $ * Laurent Deniel <deniel@worldnet.fr> * Ralf Schneider <Ralf.Schneider@t-online.de> * @@ -10,17 +10,17 @@ * By Gerald Combs <gerald@zing.org> * Copyright 1998 Gerald Combs * - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -51,9 +51,9 @@ gchar *print_nsap_net( const guint8 *buffer, int length) } if ( ( length == RFC1237_NSAP_LEN ) || ( length == RFC1237_NSAP_LEN + 1 ) ) { cur += sprintf( cur, "%s", print_area( buffer, RFC1237_FULLAREA_LEN ) ); - cur += sprintf( cur, "%s", print_system_id( buffer + RFC1237_FULLAREA_LEN, + cur += sprintf( cur, "%s", print_system_id( buffer + RFC1237_FULLAREA_LEN, RFC1237_SYSTEMID_LEN ) ); - cur += sprintf( cur, "[%02x]", + cur += sprintf( cur, "[%02x]", buffer[ RFC1237_FULLAREA_LEN + RFC1237_SYSTEMID_LEN ] ); if ( length == RFC1237_NSAP_LEN + 1 ) { cur += sprintf( cur, "-%02x", buffer[ length -1 ] ); @@ -68,14 +68,14 @@ gchar *print_nsap_net( const guint8 *buffer, int length) gchar *print_system_id( const guint8 *buffer, int length ) { int tmp; - gchar *cur; - static gchar str[MAX_SYSTEMID_LEN * 3 + 5]; /* Don't trust exact matching */ - + gchar *cur; + static gchar str[MAX_SYSTEMID_LEN * 3 + 5]; /* Don't trust exact matching */ + if ( ( length <= 0 ) || ( length > MAX_SYSTEMID_LEN ) ) { sprintf( str, "<Invalid length of SYSTEM ID>"); return( str ); - } - + } + cur = str; if ( ( 6 == length ) || ( 7 == length ) ) { /* Special case, print as MAC */ cur += sprintf(cur, "%02x%02x.%02x%02x.%02x%02x", buffer[0], buffer[1], @@ -109,7 +109,7 @@ gchar *print_area(const guint8 *buffer, int length) /* to do : all real area decoding now: NET is assumed if id len is 1 more byte * and take away all these stupid resource consuming local statics */ - + static gchar str[MAX_AREA_LEN * 3 + 20]; /* reserve space for nice layout */ gchar *cur; int tmp = 0; @@ -120,23 +120,23 @@ gchar *print_area(const guint8 *buffer, int length) sprintf( str, "<Invalid length of AREA>"); return( str ); } - - if ( ( ( NSAP_IDI_ISODCC == *buffer ) + + if ( ( ( NSAP_IDI_ISODCC == *buffer ) || ( NSAP_IDI_GOSIP2 == *buffer ) ) - && - ( ( RFC1237_FULLAREA_LEN == length ) + && + ( ( RFC1237_FULLAREA_LEN == length ) || ( RFC1237_FULLAREA_LEN + 1 == length ) - ) + ) ) { /* AFI is good and length is long enough */ - + if ( length > RFC1237_FULLAREA_LEN + 1 ) { /* Special Case Designated IS */ sprintf( str, "<Invalid length of AREA for DCC / GOSIP AFI>"); return( str ); } - - cur += sprintf( cur, "[%02x|%02x:%02x][%02x|%02x:%02x:%02x|%02x:%02x]", - buffer[0], buffer[1], buffer[2], buffer[3], buffer[4], + + cur += sprintf( cur, "[%02x|%02x:%02x][%02x|%02x:%02x:%02x|%02x:%02x]", + buffer[0], buffer[1], buffer[2], buffer[3], buffer[4], buffer[5], buffer[6], buffer[7], buffer[8] ); cur += sprintf( cur, "[%02x:%02x|%02x:%02x]", buffer[9], buffer[10], buffer[11], buffer[12] ); @@ -151,7 +151,7 @@ gchar *print_area(const guint8 *buffer, int length) buffer[2] ); return( str ); } - if ( 4 < length ) { + if ( 4 < length ) { while ( tmp < length / 4 ) { /* 16/4==4 > four Octets left to print */ cur += sprintf( cur, "%02x", buffer[tmp++] ); cur += sprintf( cur, "%02x", buffer[tmp++] ); @@ -162,10 +162,10 @@ gchar *print_area(const guint8 *buffer, int length) sprintf( --cur, "-%02x", buffer[tmp] ); } else { - for ( ; tmp < length; ) { /* print the rest without dot */ + for ( ; tmp < length; ) { /* print the rest without dot */ cur += sprintf( cur, "%02x", buffer[tmp++] ); } - } + } } return( str ); } |