mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-18 15:55:12 +08:00
remove use of strlcat
This commit is contained in:
parent
7230cf16b4
commit
1290022433
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user