Merge branch 'refs/heads/t/command_handler_cleanups'
[paraslash.git] / attribute.c
index e3bd40b..f3f8ea7 100644 (file)
@@ -149,7 +149,7 @@ static int com_lsatt_callback(struct afs_callback_arg *aca)
        int ret;
        struct pattern_match_data pmd = {
                .table = attribute_table,
-               .loop_col_num = ATTCOL_BITNUM,
+               .loop_col_num = ATTCOL_NAME,
                .match_col_num = ATTCOL_NAME,
                .patterns = {.data = (char *)aca->query.data + sizeof(flags),
                        .size = aca->query.size - sizeof(flags)},
@@ -158,7 +158,7 @@ static int com_lsatt_callback(struct afs_callback_arg *aca)
                .action = print_attribute
        };
        if (flags & LSATT_FLAG_SORT_BY_ID)
-               pmd.loop_col_num = ATTCOL_NAME;
+               pmd.loop_col_num = ATTCOL_BITNUM;
        if (flags & LSATT_FLAG_REVERSE)
                pmd.pm_flags |= PM_REVERSE_LOOP;
        ret = for_each_matching_row(&pmd);
@@ -508,7 +508,7 @@ static int attribute_open(const char *dir)
                return ret;
        }
        attribute_table = NULL;
-       if (ret >= 0 || ret == -OSL_ERRNO_TO_PARA_ERROR(E_OSL_NOENT))
+       if (ret == -OSL_ERRNO_TO_PARA_ERROR(E_OSL_NOENT))
                return 1;
        return ret;
 }