Skip to content
Snippets Groups Projects
Commit 9e8a8ea8 authored by Tom Tromey's avatar Tom Tromey
Browse files

Fix formatting in rust-lang.c

This fixes up a few formatting nits in rust-lang.c.
Built and regtested on x86-64 Fedora 23.

2016-06-25  Tom Tromey  <tom@tromey.com>

	* rust-lang.c (rust_get_disr_info, rust_print_type): Fix
	formatting.
parent fccb08f8
No related branches found
No related tags found
No related merge requests found
2016-06-25 Tom Tromey <tom@tromey.com>
* rust-lang.c (rust_get_disr_info, rust_print_type): Fix
formatting.
2016-06-25 Manish Goregaokar <manish@mozilla.com>
PR gdb/20239
......
......@@ -149,8 +149,8 @@ rust_get_disr_info (struct type *type, const gdb_byte *valaddr,
{
if (sscanf (token, "%lu", &fieldno) != 1)
{
/* We have reached the enum name,
which cannot start with a digit. */
/* We have reached the enum name, which cannot start
with a digit. */
break;
}
if (fieldno >= TYPE_NFIELDS (member_type))
......@@ -163,10 +163,7 @@ rust_get_disr_info (struct type *type, const gdb_byte *valaddr,
if (token >= name + strlen (TYPE_FIELD_NAME (type, 0)))
error (_("Invalid form for %s"), RUST_ENUM_PREFIX);
value = unpack_long (member_type,
valaddr + embedded_offset);
value = unpack_long (member_type, valaddr + embedded_offset);
if (value == 0)
{
......@@ -880,7 +877,8 @@ rust_print_type (struct type *type, const char *varstring,
fputs_filtered ("{\n", stream);
if (strncmp (TYPE_FIELD_NAME (type, 0), RUST_ENUM_PREFIX,
strlen (RUST_ENUM_PREFIX)) == 0) {
strlen (RUST_ENUM_PREFIX)) == 0)
{
const char *zero_field = strrchr (TYPE_FIELD_NAME (type, 0), '$');
if (zero_field != NULL && strlen (zero_field) > 1)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment