Closed Bug 1855926 Opened 2 years ago Closed 2 years ago

crashreporter_unix_common.cpp: remove useless c_str()

Categories

(Toolkit :: Crash Reporting, task)

task

Tracking

()

RESOLVED FIXED
121 Branch
Tracking Status
firefox121 --- fixed

People

(Reporter: Sylvestre, Assigned: qhvp8jxw7, Mentored)

References

Details

(Keywords: good-first-bug, Whiteboard: [lang=c++])

Attachments

(1 file)

Mentor: sledru
Keywords: good-first-bug
Whiteboard: [lang=c++]

UIDeleteFile(path); // Pass the string directly is the expected.

Also found that the method UIDeleteFile() which has the return type is "bool" but not used in caller functions. Does adding these lines would be helpful to check whether the deletion was successful or handle any errors?

bool success = UIDeleteFile(path);
if (!success) {
// Handle the error, if needed
}

line # 122 bool UIDeleteFile(const string& file) { return (unlink(file.c_str()) != -1); }

Flags: needinfo?(sledru)

dunno but this isn't what this bug is about :)

please open a separate issue about it

Flags: needinfo?(sledru)

Regarding return value discussion, Opened a new issue here: https://bugzilla.mozilla.org/show_bug.cgi?id=1856273

How do I go about getting this ticket assigned to me?

Flags: needinfo?(sledru)

please submit a patch and it will be done automatically

Flags: needinfo?(sledru)
Assignee: nobody → andrewlmartin
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Component: Source Code Analysis → Crash Reporting
Product: Developer Infrastructure → Toolkit
Target Milestone: --- → 121 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: