Skip to content

KW - null pointer checks added - #11469

Merged
Nir-Az merged 4 commits into
realsenseai:developmentfrom
Tamir91:kw_development_validation
Feb 23, 2023
Merged

KW - null pointer checks added#11469
Nir-Az merged 4 commits into
realsenseai:developmentfrom
Tamir91:kw_development_validation

Conversation

@Tamir91

@Tamir91 Tamir91 commented Feb 21, 2023

Copy link
Copy Markdown
Contributor

Tracking on [LRS-696]

@Tamir91
Tamir91 requested a review from OhadMeir February 21, 2023 14:54
Comment thread src/sensor.cpp Outdated

#include "sensor.h"

#include "api.h"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not mix api with internal source code.
This macro is only used on API, and if you search the code you can verify it.
Please use other methods to do so.. if (!...)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, Done.
Can I leave api usage in the "stream.h" file? I see we have usages of this macro there.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. I still see the include here
  2. Where do you see a usage of this macro on stream.h?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, not in the stream.h, in the rs.cpp.

@Nir-Az Nir-Az Feb 23, 2023

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rs.cpp can include the api.h

@OhadMeir OhadMeir left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

The "if" statements added
@Tamir91
Tamir91 force-pushed the kw_development_validation branch from 0913c2e to 6d89576 Compare February 22, 2023 13:40
Comment thread src/stream.h
The code format was refactored back to what it was before.
The api.h include removed.
@Nir-Az
Nir-Az merged commit cbf7835 into realsenseai:development Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants