summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorRichard Lowe <richlowe@richlowe.net>2011-05-16 08:45:22 +0100
committerRichard Lowe <richlowe@richlowe.net>2011-07-02 22:18:30 -0400
commita98b02b4c7e0a04d46485cf000ebfe77ed73b276 (patch)
treeff2bc1c7f2c5c28427fe22cb35449255c6c5a4eb /usr/src
parent1a6e7e8c97c383b0a4fd8177eedd48aabb4a913d (diff)
downloadillumos-joyent-a98b02b4c7e0a04d46485cf000ebfe77ed73b276.tar.gz
quota: Avoid undefined order of operations
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/fs.d/ufs/quota/quota.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/src/cmd/fs.d/ufs/quota/quota.c b/usr/src/cmd/fs.d/ufs/quota/quota.c
index 615e3c8655..9cd622b7e1 100644
--- a/usr/src/cmd/fs.d/ufs/quota/quota.c
+++ b/usr/src/cmd/fs.d/ufs/quota/quota.c
@@ -289,8 +289,8 @@ showquotas(uid_t uid, char *name)
*/
if ((mntopt = hasmntopt(&mnt, MNTOPT_ZONE)) &&
(my_zonename[0] != '\0')) {
- mntopt += strcspn(mntopt, "=");
- if (strncmp(++mntopt, my_zonename,
+ mntopt += strcspn(mntopt, "=") + 1;
+ if (strncmp(mntopt, my_zonename,
strcspn(mntopt, ",")) != 0)
continue;
}