aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/toshiba.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>1999-11-11 06:29:59 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>1999-11-11 06:29:59 +0000
commit3a64f9c65570c57db63d1f267c8a1a10a61fb8c1 (patch)
tree9d68e0db5d87693ecea66fe20e1b44f183d11efc /wiretap/toshiba.c
parent4ec9c54b4b00287efa764746602f94f52ac4af2a (diff)
Remove unnecessary file_seek per packet, speeding up loading of a
gzipped toshiba file. svn path=/trunk/; revision=1005
Diffstat (limited to 'wiretap/toshiba.c')
-rw-r--r--wiretap/toshiba.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/wiretap/toshiba.c b/wiretap/toshiba.c
index cb4e045433..76e0b1d07d 100644
--- a/wiretap/toshiba.c
+++ b/wiretap/toshiba.c
@@ -1,6 +1,6 @@
/* toshiba.c
*
- * $Id: toshiba.c,v 1.2 1999/11/11 05:36:15 gram Exp $
+ * $Id: toshiba.c,v 1.3 1999/11/11 06:29:59 gram Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org>
@@ -123,7 +123,7 @@ static int toshiba_seek_next_packet(wtap *wth)
if (byte == toshiba_rec_magic[level]) {
level++;
if (level >= TOSHIBA_REC_MAGIC_SIZE) {
- file_seek(wth->fh, -(TOSHIBA_REC_MAGIC_SIZE), SEEK_CUR);
+ /* note: we're leaving file pointer right after the magic characters */
return file_tell(wth->fh) + 1;
}
} else {
@@ -271,7 +271,8 @@ parse_toshiba_rec_hdr(wtap *wth, FILE *fh, int *err)
return -1;
}
- num_items_scanned = sscanf(line, "[No.%d] %d:%d:%d.%d %s %s",
+ /* Find text in line after "[No." */
+ num_items_scanned = sscanf(line, "%d] %d:%d:%d.%d %s %s",
&pktnum, &hr, &min, &sec, &csec, channel, direction);
if (num_items_scanned != 7) {