[SERVER-65205] Coverity analysis defect 122012: Array compared against 0 Created: 03/Apr/22  Updated: 29/Oct/23  Resolved: 05/Apr/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Erwin Pe
Resolution: Fixed Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Security 2022-04-18
Participants:

 Description   

Array compared against 0

The address of an array is never NULL, so the comparison will always evaluate the same way. Array compared against NULL pointer
/src/mongo/db/commands/fle2_compact.cpp:143: NO_EFFECT 122012 Comparing an array to null is not useful: ""false"", since the test will always evaluate as true.



 Comments   
Comment by Githook User [ 04/Apr/22 ]

Author:

{'name': 'Erwin Pe', 'email': 'erwin.pe@mongodb.com', 'username': 'erwee'}

Message: SERVER-65205 Coverity analysis defect 122012: Array compared against 0
Branch: master
https://github.com/mongodb/mongo/commit/006cef15212cf443794d9f62c31a031fc8d87fb5

Generated at Thu Feb 08 06:02:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.