Actions
Bug #1630
closedBug #1450: Illumos should be buildable with GCC4
quota(1M) relies on undefined operation order
Start date:
2011-10-12
Due date:
% Done:
100%
Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
Description
quota(1M) contains code like this:
mntopt += strcspn(mntopt, "="); if (strncmp(++mntopt, my_zonename, strcspn(mntopt, ",")) != 0) continue;
GCC4 complains that the order of the operations on mntopt is undefined (whether it is incremented before or after it is passed to strcspn). It's easy to adjust this to equivalent code without the problem:
mntopt += strcspn(mntopt, "=") + 1; if (strncmp(mntopt, my_zonename, strcspn(mntopt, ",")) != 0) continue;
Updated by Rich Lowe almost 11 years ago
- Status changed from New to Resolved
- % Done changed from 50 to 100
Resolved in r13490 commit:580776032e8f
Actions