diff --git a/ChangeLog b/ChangeLog index f120f3a20..26a2ba5c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2009-12-31 Holger Vogt + * measure.c, resource.c, mesaload.c: small updates by R. Larice + 2009-12-30 Holger Vogt * gnuplot.c: some additions diff --git a/src/frontend/measure.c b/src/frontend/measure.c index 39b6707f6..a7b12a1bb 100644 --- a/src/frontend/measure.c +++ b/src/frontend/measure.c @@ -76,7 +76,7 @@ com_meas(wordlist *wl) { d = vec_get(vec_found); if (d) { /* get its value */ - sprintf(newval, "%e\0", d->v_realdata[0]); + sprintf(newval, "%e", d->v_realdata[0]); tfree(vec_found); wl_index->wl_word = copy(newval); } @@ -92,7 +92,7 @@ com_meas(wordlist *wl) { d = vec_get(vec_found); if (d) { *equal_ptr = '\0'; - sprintf(newval, "%s=%e\0", token, d->v_realdata[0]); + sprintf(newval, "%s=%e", token, d->v_realdata[0]); // memory leak with first part of vec_found ? tfree(token); wl_index->wl_word = copy(newval); @@ -118,7 +118,7 @@ com_meas(wordlist *wl) { return; } - sprintf(newvec, "%s = %e\0", outvar, result); + sprintf(newvec, "%s = %e", outvar, result); wl_let = alloc(struct wordlist); wl_let->wl_next = NULL; wl_let->wl_word = copy(newvec); diff --git a/src/frontend/resource.c b/src/frontend/resource.c index bf9134946..4057e3206 100644 --- a/src/frontend/resource.c +++ b/src/frontend/resource.c @@ -219,7 +219,8 @@ printres(char *name) # ifdef HAVE_GETRUSAGE int ret; - struct rusage ruse = {{NULL, NULL}}; + struct rusage ruse; + memset(&ruse, 0, sizeof(ruse)); ret = getrusage(RUSAGE_SELF, &ruse); if(ret == -1) { perror("getrusage(): "); @@ -386,7 +387,8 @@ printres(char *name) if (!name || eq(name, "faults")) { #ifdef HAVE_GETRUSAGE int ret; - struct rusage ruse = {{NULL, NULL}}; + struct rusage ruse; + memset(&ruse, 0, sizeof(ruse)); ret = getrusage(RUSAGE_SELF, &ruse); if(ret == -1) { perror("getrusage(): "); diff --git a/src/spicelib/devices/mesa/mesaload.c b/src/spicelib/devices/mesa/mesaload.c index c9b23478c..75e479be2 100644 --- a/src/spicelib/devices/mesa/mesaload.c +++ b/src/spicelib/devices/mesa/mesaload.c @@ -953,7 +953,7 @@ static void mesa3(MESAmodel *model, MESAinstance *here, double vgs, { char buf[256]; void far pascal OutputDebugString(char*); - sprintf(buf,"\n%f\t%e\0",vgs,cgc); + sprintf(buf,"\n%f\t%e",vgs,cgc); OutputDebugString(buf); } */