aboutsummaryrefslogtreecommitdiffstats
path: root/packet-netbios.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-07-22 20:52:21 +0000
committerTim Potter <tpot@samba.org>2002-07-22 20:52:21 +0000
commit617a6d883ee1cc97d87ad4dd51960920424f37c0 (patch)
tree41ffccd00ac4cfe26ba98966c6fd6b57ff4547e1 /packet-netbios.c
parent976323d49ac3c1e3243f196f1425bd8837d72e14 (diff)
Remove trailing space characters between a netbios name and the name type.
This makes the display look much nicer! svn path=/trunk/; revision=5903
Diffstat (limited to 'packet-netbios.c')
-rw-r--r--packet-netbios.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/packet-netbios.c b/packet-netbios.c
index 7c52e03759..22b6ee9024 100644
--- a/packet-netbios.c
+++ b/packet-netbios.c
@@ -5,7 +5,7 @@
*
* derived from the packet-nbns.c
*
- * $Id: packet-netbios.c,v 1.48 2002/05/04 09:57:29 guy Exp $
+ * $Id: packet-netbios.c,v 1.49 2002/07/22 20:52:21 tpot Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -275,6 +275,19 @@ process_netbios_name(const u_char *name_ptr, char *name_ret)
}
}
*name_ret = '\0';
+
+ /* Remove trailing space characters from name. */
+
+ name_ret--;
+
+ for (i = 0; i < NETBIOS_NAME_LEN - 1; i++) {
+ if (*name_ret != ' ') {
+ *(name_ret + 1) = 0;
+ break;
+ }
+ name_ret--;
+ }
+
return name_type;
}