From ced8abb1253b108f6ad80fad567d6afde359f1dd Mon Sep 17 00:00:00 2001 From: Evan Huus Date: Mon, 3 Dec 2012 23:15:59 +0000 Subject: Reduce the scope of one variable definition slightly. svn path=/trunk/; revision=46361 --- ui/qt/byte_view_text.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/qt/byte_view_text.cpp b/ui/qt/byte_view_text.cpp index f0c77457a7..46963aed74 100644 --- a/ui/qt/byte_view_text.cpp +++ b/ui/qt/byte_view_text.cpp @@ -385,11 +385,10 @@ void ByteViewText::mousePressEvent (QMouseEvent * event) { if (event->button() == Qt::LeftButton) { int byte; QTextCursor cursor(cursorForPosition(event->pos())); - field_info *fi; byte = byteFromRowCol(cursor.blockNumber(), cursor.columnNumber()); if (byte >= 0) { - fi = proto_find_field_from_offset(proto_tree_, byte, tvb_); + field_info *fi = proto_find_field_from_offset(proto_tree_, byte, tvb_); if (fi && tree_widget_) { // XXX - This should probably be a ProtoTree method. -- cgit v1.2.1