diff options
author | Guy Harris <guy@alum.mit.edu> | 2008-07-11 03:16:54 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2008-07-11 03:16:54 +0000 |
commit | b92594e56cb96ca0bffe1b4bf7c617c94e54864b (patch) | |
tree | 62c21f29431e21dd4596047831cd95a6b37626b5 /epan | |
parent | 08b4f712c8d8247122fd1c4e8f559bee06eda802 (diff) |
ASCII (well, alphabetic, really) until proven otherwise; that fixes a
warning, which is a valid warning if the length is 0.
Clean up indentation a bit.
svn path=/trunk/; revision=25701
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-s1ap.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/epan/dissectors/packet-s1ap.c b/epan/dissectors/packet-s1ap.c index bec3a69337..be211512dc 100644 --- a/epan/dissectors/packet-s1ap.c +++ b/epan/dissectors/packet-s1ap.c @@ -1757,19 +1757,19 @@ dissect_s1ap_ENBname(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, pr offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, NO_BOUND, NO_BOUND, FALSE, ¶meter_tvb); -if (!parameter_tvb) - return offset; + if (!parameter_tvb) + return offset; - length = tvb_length(parameter_tvb); + length = tvb_length(parameter_tvb); - for (p_offset=0; p_offset < length; p_offset++){ + is_ascii = TRUE; + for (p_offset=0; p_offset < length; p_offset++){ if(!isalpha(tvb_get_guint8(parameter_tvb, p_offset ))){ is_ascii = FALSE; break; } - is_ascii = TRUE; - } - if (is_ascii) + } + if (is_ascii) proto_item_append_text(actx->created_item,"(%s)",tvb_format_text(parameter_tvb, 0, length)); |