Closed Bug 888546 Opened 11 years ago Closed 11 years ago

ptio.c:PR_ImportUDPSocket doesn't work

Categories

(NSPR :: NSPR, defect, P1)

x86_64
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED
4.10.2

People

(Reporter: mitr, Assigned: mitr)

Details

Attachments

(2 files)

ptio.c:PR_ImportUDPSocket has a typo that causes it to close the osfd on success, which makes the return value unusable.
Attached file Test program
Attachment #769283 - Flags: review?(wtc)
Attachment #769283 - Flags: review?(kaie)
Attachment #769280 - Flags: review?(wtc)
Attachment #769280 - Flags: review?(kaie)
Attachment #769283 - Flags: review?(wtc)
Attachment #769283 - Flags: review?(kaie)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 769280 [details] [diff] [review]
Fix a typo in ptio.c:PR_ImportUDPSocket

Your patch is obviously correct. The function returns NULL on failure. Your patch achieves consistency with other, similar functions in the same source file.

r=kaie
Attachment #769280 - Flags: review?(kaie) → review+
Mirek, thanks for the patch!

Checked in:
https://hg.mozilla.org/projects/nspr/rev/63dba74ed1d7
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 4.10.2
Comment on attachment 769280 [details] [diff] [review]
Fix a typo in ptio.c:PR_ImportUDPSocket

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

r=wtc. Thanks for the patch. I also inspected similar code in ptio.c
and make sure there is no other bug of this kind.
Attachment #769280 - Flags: review?(wtc) → review+
Assignee: wtc → mitr
Priority: -- → P1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: