diff options
author | Stu Grossman <grossman@cygnus> | 1991-08-22 22:50:50 +0000 |
---|---|---|
committer | Stu Grossman <grossman@cygnus> | 1991-08-22 22:50:50 +0000 |
commit | 61a7292f6f9ba0f3885194d2b6f9e91f869e816b (patch) | |
tree | 268ce6ecee1f7320490dea73dfe76f78e731c99f /gdb/cplus-dem.c | |
parent | aa69ff846c6c4ec6fb77e148fa1bc1eb4a907799 (diff) | |
download | gdb-61a7292f6f9ba0f3885194d2b6f9e91f869e816b.zip gdb-61a7292f6f9ba0f3885194d2b6f9e91f869e816b.tar.gz gdb-61a7292f6f9ba0f3885194d2b6f9e91f869e816b.tar.bz2 |
lint
Diffstat (limited to 'gdb/cplus-dem.c')
-rw-r--r-- | gdb/cplus-dem.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gdb/cplus-dem.c b/gdb/cplus-dem.c index d303ea4..33b46ab 100644 --- a/gdb/cplus-dem.c +++ b/gdb/cplus-dem.c @@ -249,8 +249,7 @@ cplus_demangle (type, arg_mode) /* destructor */ if (type[0] == '_' && type[1] == CPLUS_MARKER && type[2] == '_') { - int n = (strlen (type) - 3)*2 + 3 + 2 + 1; - char *tem = (char *) xmalloc (n); + char *tem = (char *) xmalloc ((strlen (type) - 3)*2 + 3 + 2 + 1); strcpy (tem, type + 3); strcat (tem, "::~"); strcat (tem, type + 3); @@ -260,8 +259,7 @@ cplus_demangle (type, arg_mode) /* static data member */ if (*type != '_' && (p = strchr (type, CPLUS_MARKER)) != NULL) { - int n = strlen (type) + 2; - char *tem = (char *) xmalloc (n); + char *tem = (char *) xmalloc (strlen (type) + 2); memcpy (tem, type, p - type); strcpy (tem + (p - type), "::"); strcpy (tem + (p - type) + 2, p + 1); @@ -270,8 +268,7 @@ cplus_demangle (type, arg_mode) /* virtual table "_vt$" */ if (type[0] == '_' && type[1] == 'v' && type[2] == 't' && type[3] == CPLUS_MARKER) { - int n = strlen (type + 4) + 14 + 1; - char *tem = (char *) xmalloc (n); + char *tem = (char *) xmalloc (strlen (type + 4) + 14 + 1); strcpy (tem, type + 4); strcat (tem, " virtual table"); return tem; |