SCP: Compiler suggested cleanup
This commit is contained in:
parent
2b30084a53
commit
6ff3eeac80
2 changed files with 2 additions and 2 deletions
2
scp.c
2
scp.c
|
@ -5377,7 +5377,7 @@ sprintf (FullPath, "%s%s", directory, filename);
|
|||
if ((dname[strlen (dname) - 1] == '/') || (dname[strlen (dname) - 1] == '\\'))
|
||||
dname[strlen (dname) - 1] = '\0';
|
||||
if ((!stat (dname, &deststat)) && (deststat.st_mode & S_IFDIR)) {
|
||||
char *dslash = (strrchr (dname, '/') ? "/" : (strrchr (dname, '\\') ? "\\" : "/"));
|
||||
const char *dslash = (strrchr (dname, '/') ? "/" : (strrchr (dname, '\\') ? "\\" : "/"));
|
||||
|
||||
dname[sizeof (dname) - 1] = '\0';
|
||||
snprintf (&dname[strlen (dname)], sizeof (dname) - strlen (dname), "%s%s", dslash, filename);
|
||||
|
|
|
@ -488,7 +488,7 @@ if (!fOut) {
|
|||
st = sim_messagef (SCPE_ARG, "Can't open '%s' for output: %s\n", dest_file, strerror (errno));
|
||||
goto Cleanup_Return;
|
||||
}
|
||||
buf = malloc (BUFSIZ);
|
||||
buf = (char *)malloc (BUFSIZ);
|
||||
while ((bytes = fread (buf, 1, BUFSIZ, fIn)))
|
||||
fwrite (buf, 1, bytes, fOut);
|
||||
Cleanup_Return:
|
||||
|
|
Loading…
Add table
Reference in a new issue