diff options
author | truckman <truckman@FreeBSD.org> | 2004-03-16 01:28:45 +0000 |
---|---|---|
committer | truckman <truckman@FreeBSD.org> | 2004-03-16 01:28:45 +0000 |
commit | 2b0bda9870e0b9d139131c9bd58ebed9f9c3086b (patch) | |
tree | 466c3e72a795f8ea117699c43985d036dedb0f87 /lib/libc/stdio/tmpnam.c | |
parent | 12adb9e4a7a3722da6282caae8bab77c1170d4fd (diff) | |
download | FreeBSD-src-2b0bda9870e0b9d139131c9bd58ebed9f9c3086b.zip FreeBSD-src-2b0bda9870e0b9d139131c9bd58ebed9f9c3086b.tar.gz |
Don't bother calling vslock() and vsunlock() if oldlen is zero.
If vslock() returns ENOMEM, sysctl_wire_old_buffer() should set
wiredlen to zero and return zero (success) so that the handler will
operate according to sysctl(3):
The size of the buffer is given by the location specified by
oldlenp before the call, and that location gives the amount
of data copied after a successful call and after a call that
returns with the error code ENOMEM.
The handler will return an ENOMEM error because the zero length
buffer will overflow.
Diffstat (limited to 'lib/libc/stdio/tmpnam.c')
0 files changed, 0 insertions, 0 deletions