]> git.ipfire.org Git - thirdparty/sarg.git/blobdiff - html.c
Removed a few unecessary strings copy.
[thirdparty/sarg.git] / html.c
diff --git a/html.c b/html.c
index 7f42f41f739d4168302929835d86abe2832f6d20..2a1fd74278472f11aeaf704c4348efa3f4af8fa7 100644 (file)
--- a/html.c
+++ b/html.c
@@ -161,16 +161,15 @@ void htmlrel(void)
 
       get_usertab_name(u2,name2,sizeof(name2));
 
-      if(dotinuser && strstr(name2,"_")) {
-         str2=(char *)subs(name2,"_",".");
-         strcpy(name2,str2);
+      if(dotinuser && strchr(name2,'_')) {
+         subs(name2,sizeof(name2),"_",".");
       }
 
       if ((fp_in = fopen(arqin, "r")) == 0){
          fprintf(stderr, "SARG: (html3) %s: %s\n",text[45],arqin);
          exit(1);
       }
-   
+
       while(fgets(buf,sizeof(buf),fp_in)!=NULL) {
          if (getword(wtemp,sizeof(wtemp),buf,' ')<0) {
             printf("SARG: Maybe you have a broken record or garbage in your %s file.\n",arqin);
@@ -673,9 +672,9 @@ void htmlrel(void)
          twork2=my_atoll(totuser);
          twork=ttnacc/twork2;
    
-         sprintf(wwork1,"%s",fixnum(twork,1));
-         sprintf(wwork2,"%s",fixnum(totbytes2,1));
-         sprintf(wwork3,"%s",fixnum2(totelap2,1));
+         strcpy(wwork1,fixnum(twork,1));
+         strcpy(wwork2,fixnum(totbytes2,1));
+         strcpy(wwork3,fixnum2(totelap2,1));
 
          sprintf(val6,"%s",buildtime(totelap2));
          sprintf(val7,"%3.2f%%",perc2);