s3: Use ARRAY_SIZE in bsd_attr_list
[ira/wip.git] / source3 / lib / system.c
index 821dd8d957f776ad0504f59c31ea7f47933879d2..a308014f464766cdc5b6a7e1c5e94be2215ed8de 100644 (file)
@@ -1797,7 +1797,7 @@ static ssize_t bsd_attr_list (int type, extattr_arg arg, char *list, size_t size
        int i, t, len;
        char *buf;
        /* Iterate through extattr(2) namespaces */
-       for(t = 0; t < (sizeof(extattr)/sizeof(extattr[0])); t++) {
+       for(t = 0; t < ARRAY_SIZE(extattr); t++) {
                switch(type) {
 #if defined(HAVE_EXTATTR_LIST_FILE)
                        case 0: