remove use of strlcat

This commit is contained in:
Dennis Heimbigner 2022-03-14 14:00:09 -06:00
parent 7230cf16b4
commit 1290022433

View File

@ -41,14 +41,17 @@ main(int argc, char** argv)
}
/* build the url */
snprintf(url,sizeof(url),"file://%s#dap4&debug=copy",argv[0]);
if(argc >= 3) {
strlcat(url,"&substratename=",sizeof(url));
strlcat(url,argv[1],sizeof(url));
}
snprintf(url,sizeof(url),"file://%s#dap4&debug=copy%s%s%s",
argv[0]
(argc >= 3 ? "&substratename=" : ""),
(argc >= 3 ? "argv[1]" : ""),
#ifdef DEBUG
strlcat(url,"&log",sizeof(url));
"&log"
#else
""
#endif
);
}
#ifdef DEBUG
fprintf(stderr,"test_data url=%s\n",url);