Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LEFEBVREJP email
rsm
Commits
ec6db5a2
Commit
ec6db5a2
authored
May 08, 2020
by
Huff, Israel
Browse files
added more nullptr checks
parent
1b345d20
Pipeline
#100932
failed with stages
in 4 minutes and 40 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
rsmcore/session.cc
View file @
ec6db5a2
...
@@ -324,7 +324,11 @@ SFTPDir::~SFTPDir()
...
@@ -324,7 +324,11 @@ SFTPDir::~SFTPDir()
bool
SFTPDir
::
isOpen
()
{
return
(
p
->
dir
!=
nullptr
);
}
bool
SFTPDir
::
isOpen
()
{
return
(
p
->
dir
!=
nullptr
);
}
bool
SFTPDir
::
hasNext
()
{
return
(
0
==
sftp_dir_eof
(
p
->
dir
));
}
bool
SFTPDir
::
hasNext
()
{
if
(
nullptr
==
p
->
dir
)
return
false
;
return
(
0
==
sftp_dir_eof
(
p
->
dir
));
}
// returns SFTPAttributes structure on success or nullptr on failure
// returns SFTPAttributes structure on success or nullptr on failure
// caller is responsible for deleting returned SFTPAttributes structure
// caller is responsible for deleting returned SFTPAttributes structure
...
@@ -368,6 +372,7 @@ SFTPAttributes* SFTPDir::next()
...
@@ -368,6 +372,7 @@ SFTPAttributes* SFTPDir::next()
bool
SFTPDir
::
close
()
bool
SFTPDir
::
close
()
{
{
if
(
nullptr
==
p
->
dir
)
return
true
;
int
rc
=
sftp_closedir
(
p
->
dir
);
int
rc
=
sftp_closedir
(
p
->
dir
);
if
(
SSH_NO_ERROR
==
rc
)
if
(
SSH_NO_ERROR
==
rc
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment