From 985ef5c2e8f36cade07c2cabe7efd14ede36f01d Mon Sep 17 00:00:00 2001 From: jpandre Date: Tue, 15 Dec 2009 18:21:57 +0000 Subject: [PATCH] Avoid a compiler warning --- libntfs-3g/acls.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libntfs-3g/acls.c b/libntfs-3g/acls.c index 4bfd3652..ab1a3557 100644 --- a/libntfs-3g/acls.c +++ b/libntfs-3g/acls.c @@ -2985,8 +2985,10 @@ static int build_std_permissions(const char *securattr, if (offdacl) { acecnt = le16_to_cpu(pacl->ace_count); offace = offdacl + sizeof(ACL); - } else + } else { acecnt = 0; + offace = 0; + } for (nace = 0; nace < acecnt; nace++) { pace = (const ACCESS_ALLOWED_ACE*)&securattr[offace]; if (!(pace->flags & INHERIT_ONLY_ACE)) { @@ -3255,8 +3257,10 @@ static int build_ownadmin_permissions(const char *securattr, if (offdacl) { acecnt = le16_to_cpu(pacl->ace_count); offace = offdacl + sizeof(ACL); - } else + } else { acecnt = 0; + offace = 0; + } firstapply = TRUE; isforeign = 3; for (nace = 0; nace < acecnt; nace++) {