Fix pluralization of "bytes" so it doesn't say "1 bytes".
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 21 Nov 2006 21:49:58 +0000 (21:49 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 21 Nov 2006 21:49:58 +0000 (21:49 +0000)
Clean up indentation.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19953 f5534014-38df-0310-8fa8-9805f1628bb7

epan/reassemble.c

index 39e9a42b3e87b3059d0d56c4f9ba697a796bbc69..22273a2c244485d89cc03d0b2a6cc82d2a6efcfc 100644 (file)
@@ -819,8 +819,8 @@ fragment_add_common(tvbuff_t *tvb, int offset, packet_info *pinfo, guint32 id,
        gboolean already_added=pinfo->fd->flags.visited;
 
 
-    /* dissector shouldn't give us garbage tvb info */
-    DISSECTOR_ASSERT(tvb_bytes_exist(tvb, offset, frag_data_len));
+       /* dissector shouldn't give us garbage tvb info */
+       DISSECTOR_ASSERT(tvb_bytes_exist(tvb, offset, frag_data_len));
 
        /* create key to search hash with */
        key.src = pinfo->src;
@@ -1780,7 +1780,8 @@ show_fragment(fragment_data *fd, int offset, const fragment_items *fit,
        int hf;
 
        if (first_frag)
-               proto_item_append_text(fi, " (%u bytes): ", tvb_length(tvb));
+               proto_item_append_text(fi, " (%u byte%s): ", tvb_length(tvb),
+                   plurality(tvb_length(tvb), "", "s"));
        else
                proto_item_append_text(fi, ", ");
        proto_item_append_text(fi, "#%u(%u)", fd->frame, fd->len);
@@ -1801,11 +1802,12 @@ show_fragment(fragment_data *fd, int offset, const fragment_items *fit,
                fei = proto_tree_add_uint_format(ft, hf,
                        tvb, offset, fd->len,
                        fd->frame,
-                       "Frame: %u, payload: %u-%u (%u bytes)",
+                       "Frame: %u, payload: %u-%u (%u byte%s)",
                        fd->frame,
                        offset,
                        offset+fd->len-1,
-                       fd->len);
+                       fd->len,
+                       plurality(fd->len, "", "s"));
        }
        PROTO_ITEM_SET_GENERATED(fei);
        if (fd->flags & (FD_OVERLAP|FD_OVERLAPCONFLICT