summaryrefslogtreecommitdiff
path: root/src/intcgm
diff options
context:
space:
mode:
Diffstat (limited to 'src/intcgm')
-rw-r--r--src/intcgm/bparse.c6
-rw-r--r--src/intcgm/intcgm2.c6
-rw-r--r--src/intcgm/tparse.c2
3 files changed, 6 insertions, 8 deletions
diff --git a/src/intcgm/bparse.c b/src/intcgm/bparse.c
index ad08179..c0ffada 100644
--- a/src/intcgm/bparse.c
+++ b/src/intcgm/bparse.c
@@ -179,7 +179,7 @@ int cgmb_intpre ( void )
int cgmb_realpr ( void )
{
- short mode, i1;
+ short mode = 0, i1;
long i2, i3;
if ( cgmb_e ( &i1 ) ) return 1;
@@ -543,7 +543,7 @@ int cgmb_vdcipr ( void )
int cgmb_vdcrpr ( void )
{
short i1;
- long mode, i2, i3;
+ long mode = 0, i2, i3;
if ( cgmb_e ( &i1 ) ) return 1;
if ( cgmb_i ( &i2 ) ) return 1;
@@ -1320,7 +1320,7 @@ int cgmb_txftin ( void )
font = (char *) cgm_GetList ( intcgm_text_att.font_list, intcgm_text_att.font_index );
- if ( font==NULL ) font = (char*)strdup ( "SYSTEM" );
+ if ( font==NULL ) font = "SYSTEM";
intcgm_text_att.font = 0;
for ( i=0; font_array[i]!=NULL; i++ )
diff --git a/src/intcgm/intcgm2.c b/src/intcgm/intcgm2.c
index f16c916..b6be7ee 100644
--- a/src/intcgm/intcgm2.c
+++ b/src/intcgm/intcgm2.c
@@ -1171,7 +1171,7 @@ int cgmb_r ( double *d )
int cgmb_s ( char **str )
{
- register unsigned i;
+ register unsigned i = 0;
unsigned char l;
unsigned short l1;
unsigned short cont;
@@ -1206,9 +1206,7 @@ int cgmb_s ( char **str )
}
s[i] = '\0';
- *str = (char*)strdup ( s );
-
- free ( s );
+ *str = s;
return 0;
}
diff --git a/src/intcgm/tparse.c b/src/intcgm/tparse.c
index 0402ce6..9bc47b3 100644
--- a/src/intcgm/tparse.c
+++ b/src/intcgm/tparse.c
@@ -1021,7 +1021,7 @@ int cgmt_txftin ( void ) /* text font index */
font = (char *) cgm_GetList ( intcgm_text_att.font_list, intcgm_text_att.font_index );
- if ( font==NULL ) font = (char*)strdup ( "SYSTEM" );
+ if ( font==NULL ) font = "SYSTEM";
intcgm_text_att.font = 0;
for ( i=0; font_array[i]!=NULL; i++ )