Page MenuHomeFreeBSD

sndctl(8): Allow read-only sysctls
AcceptedPublic

Authored by christos on Sat, May 17, 9:04 PM.

Details

Summary

Needed by follow-up patch.

Sponsored by: The FreeBSD Foundation
MFC after: 1 day

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 64250
Build 61134: arc lint + arc unit

Event Timeline

usr.sbin/sndctl/sndctl.c
676

For such simple code, it's IMO better to just use an if-statement:

if (arg != NULL) {
    n = strtol(...)
    ...
}
679

For this to work correctly, you need to set errno = 0 before the strtol() call.

christos marked 2 inline comments as done.

Address Mark's comments.

This revision is now accepted and ready to land.Sun, May 18, 6:24 PM