aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbtk.c
diff options
context:
space:
mode:
authorKeith Seitz <keiths@cygnus>1998-03-31 23:42:51 +0000
committerKeith Seitz <keiths@cygnus>1998-03-31 23:42:51 +0000
commit390ca26a02a472a772cb52cec7474199d39f6293 (patch)
treecd0e7d32e61a3207f9fbd6ad616217e824382d91 /gdb/gdbtk.c
parentcfa9f8450c82b71a4e7b8acd7c064872706327eb (diff)
downloadgdb-390ca26a02a472a772cb52cec7474199d39f6293.zip
gdb-390ca26a02a472a772cb52cec7474199d39f6293.tar.gz
gdb-390ca26a02a472a772cb52cec7474199d39f6293.tar.bz2
* gdbtk.c (gdb_loadfile): Don't use the return result from sprintf, whi
ch returns a char * under SunOS4.
Diffstat (limited to 'gdb/gdbtk.c')
-rw-r--r--gdb/gdbtk.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/gdb/gdbtk.c b/gdb/gdbtk.c
index 5737fbd..b3d110f 100644
--- a/gdb/gdbtk.c
+++ b/gdb/gdbtk.c
@@ -3201,16 +3201,28 @@ gdb_loadfile (clientData, interp, objc, objv)
if (linenumbers)
{
if (ltable[ln >> 3] & (1 << (ln % 8)))
- a[0]->length = sprintf (buf,"%s insert end {-\t%d} break_tag", widget, ln);
+ {
+ sprintf (buf,"%s insert end {-\t%d} break_tag", widget, ln);
+ a[0]->length = strlen (buf);
+ }
else
- a[0]->length = sprintf (buf,"%s insert end { \t%d} \"\"", widget, ln);
+ {
+ sprintf (buf,"%s insert end { \t%d} \"\"", widget, ln);
+ a[0]->length = strlen (buf);
+ }
}
else
{
if (ltable[ln >> 3] & (1 << (ln % 8)))
- a[0]->length = sprintf (buf,"%s insert end {-\t} break_tag", widget);
+ {
+ sprintf (buf,"%s insert end {-\t} break_tag", widget);
+ a[0]->length = strlen (buf);
+ }
else
- a[0]->length = sprintf (buf,"%s insert end { \t} \"\"", widget);
+ {
+ sprintf (buf,"%s insert end { \t} \"\"", widget);
+ a[0]->length = strlen (buf);
+ }
}
b[0]->length = strlen(b[0]->bytes);
Tcl_SetListObj(a[1],2,b);