X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fguile%2Fscm-type.c;h=d21a7aec8c1eaa4d5705a2be32286ccbe8a25358;hb=61012eef8463764ccd9117dc1c9bc43cc452b7cc;hp=4f46139241f8483dc509ebac533c7db0246a3045;hpb=fce10a8494efa8faec67b718f25e06d3d71694b3;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/guile/scm-type.c b/gdb/guile/scm-type.c index 4f46139241..d21a7aec8c 100644 --- a/gdb/guile/scm-type.c +++ b/gdb/guile/scm-type.c @@ -713,7 +713,7 @@ tyscm_array_1 (SCM self, SCM n1_scm, SCM n2_scm, int is_vector, n1 = 0; } - if (n2 < n1 - 1) + if (n2 < n1 - 1) /* Note: An empty array has n2 == n1 - 1. */ { gdbscm_out_of_range_error (func_name, SCM_ARG3, scm_cons (scm_from_long (n1), @@ -1216,11 +1216,11 @@ tyscm_lookup_typename (const char *type_name, const struct block *block) TRY_CATCH (except, RETURN_MASK_ALL) { - if (!strncmp (type_name, "struct ", 7)) + if (startswith (type_name, "struct ")) type = lookup_struct (type_name + 7, NULL); - else if (!strncmp (type_name, "union ", 6)) + else if (startswith (type_name, "union ")) type = lookup_union (type_name + 6, NULL); - else if (!strncmp (type_name, "enum ", 5)) + else if (startswith (type_name, "enum ")) type = lookup_enum (type_name + 5, NULL); else type = lookup_typename (current_language, get_current_arch (),