Details
Details
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
No Lint Coverage - Unit
No Test Coverage - Build Status
Buildable 28456 Build 26521: arc lint + arc unit
Event Timeline
| contrib/smbfs/lib/smb/rcfile.c | ||
|---|---|---|
| 166–171 | I'd propose: for(sectletter = sectname; *sectletter; sectletter++) {
if(isupper(*sectletter) || *sectletter == ':')
continue;
if(!strcmp(sectname, "default"))
dprintf(STDERR_FILENO, "warning: Section name [%s] may contain problematic chars, like lower-case letters\n", sectname);
break;
}This makes the scan more readable, short cut if the result is known, and keep the search and the response together. | |
| contrib/smbfs/lib/smb/rcfile.c | ||
|---|---|---|
| 166–171 | I like the proposal better, but I think that special chars should be allowed, then testing isupper and !islower should do the trick instead of only testing ':' | |
| contrib/smbfs/lib/smb/rcfile.c | ||
|---|---|---|
| 166–171 | This would simplify the code to: for(sectletter = sectname; *sectletter; sectletter++) {
if(islower(*sectletter)) {
if(!strcmp(sectname, "default"))
dprintf(STDERR_FILENO, "warning: Section name [%s] contains lower-case letters\n", sectname);
break;
}
} | |
| contrib/smbfs/lib/smb/rcfile.c | ||
|---|---|---|
| 161–162 | If the section was found, the check is skipped. That's okay, because the check should be done only if the a new section is encountered the first time. | |