Closed Bug 962088 Opened 7 years ago Closed 7 years ago

Fix incorrect use of NS_ARRAY_LENGTH in nsMailGNOMEIntegration.cpp

Categories

(Thunderbird :: OS Integration, defect)

All
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 29.0

People

(Reporter: poiru, Assigned: poiru)

References

Details

Attachments

(1 file, 2 obsolete files)

In nsMailGNOMEIntegration.cpp, `NS_ARRAY_LENGTH(sAppTypes[i].protocols)` is incorrect as it NS_ARRAY_LENGTH will always yield 1 with a `const char* const*` type.
Woops, uploaded wrong patch previously.
Attachment #8362980 - Attachment is obsolete: true
Attachment #8362980 - Flags: review?(mconley)
Attachment #8362982 - Flags: review?(mconley)
Comment on attachment 8362982 [details] [diff] [review]
Fix incorrect use of NS_ARRAY_LENGTH in nsMailGNOMEIntegration.cpp

In case mconley is not a friend of C++, let's ask jcranmer too.
Attachment #8362982 - Flags: review?(Pidgeot18)
Comment on attachment 8362982 [details] [diff] [review]
Fix incorrect use of NS_ARRAY_LENGTH in nsMailGNOMEIntegration.cpp

Review of attachment 8362982 [details] [diff] [review]:
-----------------------------------------------------------------

::: mail/components/shell/nsMailGNOMEIntegration.cpp
@@ +55,5 @@
> +    nsIShellService::MAIL, sMailProtocols, ArrayLength(sMailProtocols),
> +    "message/rfc822", "eml"
> +  },
> +  {
> +    nsIShellService::NEWS, sNewsProtocols, ArrayLength(sNewsProtocols),

If you're touching this already, please add in two nullptrs for the mimeType and extensions variables..
Attachment #8362982 - Flags: review?(Pidgeot18) → review+
Addresses comment #4.
Attachment #8362982 - Attachment is obsolete: true
Attachment #8362982 - Flags: review?(mconley)
Attachment #8367480 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/comm-central/rev/8c6ac23f0746
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 29.0
You need to log in before you can comment on or make changes to this bug.