use sizeof not strlen

This commit is contained in:
Kurt Zeilenga 2002-01-02 16:57:30 +00:00
parent 4aa2a28692
commit f418f6247f

View file

@ -119,7 +119,7 @@ doargs(
rflag++;
break;
case 't': /* dir to use for our copies of replogs */
g->slurpd_rdir = (char *)malloc (strlen(optarg) + strlen("/replica") + 1);
g->slurpd_rdir = (char *)malloc (strlen(optarg) + sizeof("/replica"));
sprintf(g->slurpd_rdir, "%s/replica", optarg);
break;
default: