Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
c6d96aa6
Commit
c6d96aa6
authored
1 year ago
by
Deucе
Browse files
Options
Downloads
Patches
Plain Diff
Fix static casts.
These functions take a uint32_t, not a time32_t (which is an int32_t).
parent
badef1ab
No related branches found
No related tags found
No related merge requests found
Pipeline
#6042
passed
1 year ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sbbs3/sftp.cpp
+4
-4
4 additions, 4 deletions
src/sbbs3/sftp.cpp
with
4 additions
and
4 deletions
src/sbbs3/sftp.cpp
+
4
−
4
View file @
c6d96aa6
...
...
@@ -603,7 +603,7 @@ homefile_attrs(sbbs_t *sbbs, const char *path)
sftp_fattr_set_permissions
(
attr
,
S_IFREG
|
S_IRWXU
|
S_IRUSR
|
S_IWUSR
);
sftp_fattr_set_uid_gid
(
attr
,
sbbs
->
useron
.
number
,
users_gid
);
sftp_fattr_set_size
(
attr
,
flength
(
path
));
time
32_t
fd
=
static_cast
<
time
32_t
>
(
fdate
(
path
));
uint
32_t
fd
=
static_cast
<
uint
32_t
>
(
fdate
(
path
));
sftp_fattr_set_times
(
attr
,
fd
,
fd
);
return
attr
;
}
...
...
@@ -618,7 +618,7 @@ sshkeys_attrs(sbbs_t *sbbs, const char *path)
sftp_fattr_set_permissions
(
attr
,
S_IFLNK
|
S_IRWXU
|
S_IRUSR
|
S_IWUSR
);
sftp_fattr_set_uid_gid
(
attr
,
sbbs
->
useron
.
number
,
users_gid
);
sftp_fattr_set_size
(
attr
,
flength
(
path
));
time
32_t
fd
=
static_cast
<
time
32_t
>
(
fdate
(
path
));
uint
32_t
fd
=
static_cast
<
uint
32_t
>
(
fdate
(
path
));
sftp_fattr_set_times
(
attr
,
fd
,
fd
);
return
attr
;
}
...
...
@@ -927,8 +927,8 @@ get_filebase_attrs(sbbs_t *sbbs, int32_t dir, smbfile_t *file)
{
sftp_file_attr_t
attr
=
sftp_fattr_alloc
();
uint32_t
perms
=
S_IFREG
|
S_IRUSR
|
S_IWUSR
;
time
32_t
atime
;
time
32_t
mtime
;
uint
32_t
atime
;
uint
32_t
mtime
;
if
(
attr
==
nullptr
)
return
nullptr
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment