diff options
author | Dario Lombardo <lomato@gmail.com> | 2019-03-24 15:37:21 +0100 |
---|---|---|
committer | Dario Lombardo <lomato@gmail.com> | 2019-03-24 22:15:22 +0000 |
commit | ea39ed7410081f23225ffaa7b32f2d9410ac7cbd (patch) | |
tree | b58d0dc2e709c787fae5a2f2cb69009dba767f6d /wiretap/iseries.c | |
parent | c1fd0194f42d04c771e38c680b1fde51760233b9 (diff) |
iseries: fix wrong indentation.
Change-Id: I4d6e145412037e4a3a40688139b12ada0f36e413
Reviewed-on: https://code.wireshark.org/review/32556
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Diffstat (limited to 'wiretap/iseries.c')
-rw-r--r-- | wiretap/iseries.c | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/wiretap/iseries.c b/wiretap/iseries.c index 84b8ec7557..9911cc39d2 100644 --- a/wiretap/iseries.c +++ b/wiretap/iseries.c @@ -418,38 +418,38 @@ iseries_seek_next_packet (wtap * wth, int *err, gchar **err_info) *err = file_error (wth->fh, err_info); return -1; } - /* Convert UNICODE to ASCII if required and determine */ - /* the number of bytes to rewind to beginning of record. */ - if (iseries->format == ISERIES_FORMAT_UNICODE) - { - /* buflen is #bytes to 1st 0x0A */ - buflen = iseries_UNICODE_to_ASCII ((guint8 *) buf, ISERIES_LINE_LENGTH); - } - else - { - /* Else buflen is just length of the ASCII string */ - buflen = (long) strlen (buf); - } - ascii_strup_inplace (buf); - /* If packet header found return the offset */ - num_items_scanned = - sscanf (buf+78, - "%*[ \n\t]ETHV2%*[ .:\n\t]TYPE%*[ .:\n\t]%4s",type); - if (num_items_scanned == 1) - { - /* Rewind to beginning of line */ - cur_off = file_tell (wth->fh); - if (cur_off == -1) - { - *err = file_error (wth->fh, err_info); - return -1; - } - if (file_seek (wth->fh, cur_off - buflen, SEEK_SET, err) == -1) - { - return -1; - } - return cur_off - buflen; - } + /* Convert UNICODE to ASCII if required and determine */ + /* the number of bytes to rewind to beginning of record. */ + if (iseries->format == ISERIES_FORMAT_UNICODE) + { + /* buflen is #bytes to 1st 0x0A */ + buflen = iseries_UNICODE_to_ASCII ((guint8 *) buf, ISERIES_LINE_LENGTH); + } + else + { + /* Else buflen is just length of the ASCII string */ + buflen = (long) strlen (buf); + } + ascii_strup_inplace (buf); + /* If packet header found return the offset */ + num_items_scanned = + sscanf (buf+78, + "%*[ \n\t]ETHV2%*[ .:\n\t]TYPE%*[ .:\n\t]%4s",type); + if (num_items_scanned == 1) + { + /* Rewind to beginning of line */ + cur_off = file_tell (wth->fh); + if (cur_off == -1) + { + *err = file_error (wth->fh, err_info); + return -1; + } + if (file_seek (wth->fh, cur_off - buflen, SEEK_SET, err) == -1) + { + return -1; + } + return cur_off - buflen; + } } *err = WTAP_ERR_BAD_FILE; |