cvs commit: src/sys/netgraph ng_device.c
Gleb Smirnoff
glebius at FreeBSD.org
Tue Jul 20 06:16:17 PDT 2004
glebius 2004-07-20 13:16:17 UTC
FreeBSD src repository
Modified files:
sys/netgraph ng_device.c
Log:
In ng_device_newhook():
- Return meaningful return errorcodes.
- Free previously allocated connection in error cases.
In ng_device_rcvdata():
- Return meaningful return errorcodes.
- Detach mbuf from netgraph item, and free the item before
doing any other actions that may return from method.
- Do not call strange malloc() for buffer. [1]
- In case of any error jump to end, where mbuf is freed.
In ng_device_disconnect():
- Return meaningful return errorcodes.
- Free disconnected connection.
style(9) in mentioned above functions:
- Remove '/* NGD_DEBUG */', when only one line is ifdef'ed.
- Remove extra braces to easier reading.
- Add space after comma in function calls.
PR: kern/41881 (part)
Reviewed by: marks
Approved by: julian (mentor)
Revision Changes Path
1.11 +38 -38 src/sys/netgraph/ng_device.c
More information about the cvs-all
mailing list