Page MenuHomeFreeBSD

MAC/do: parse_rules(): Copy input string on its own
AcceptedPublic

Authored by olce on Fri, Nov 15, 5:06 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 20, 8:11 AM
Unknown Object (File)
Tue, Nov 19, 4:42 AM
Unknown Object (File)
Tue, Nov 19, 3:44 AM
Unknown Object (File)
Mon, Nov 18, 3:09 PM
Unknown Object (File)
Mon, Nov 18, 2:51 PM
Unknown Object (File)
Mon, Nov 18, 1:37 PM
Unknown Object (File)
Mon, Nov 18, 12:39 PM
Unknown Object (File)
Fri, Nov 15, 5:35 PM

Details

Reviewers
bapt
Summary

This revision is part of a series. Click on the Stack tab below to see the context.
This series has also been squeezed into D47633 to provide an overall view.

Commit message:
Since all callers have to do it, save them that burden and do it in
parse_rules() instead.

While here, replace 'strlen(x) == 0' with the simpler and more efficient
'x[0] == 0'.

Diff Detail

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

Event Timeline

olce requested review of this revision.Fri, Nov 15, 5:06 PM

In the proposed commit message, I guess you mean:

While here, replace strlen(x) == 0 with the simpler and more efficient
x[0] == '\0'.

Note 0 and \0. I believe the later is better.

Note 0 and \0. I believe the later is better.

Yes. The initial version probably was using 0 and later I changed the code but forgetting to update the commit message. Will do.

This revision is now accepted and ready to land.Tue, Nov 19, 7:47 AM