]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - attribute.c
error.h: Add more helper macros.
[paraslash.git] / attribute.c
index 694a962bcd27e53788cd64636b3b165396973e6a..d34f7d6371f7995f17a23fa9df4d3ec8b39f363e 100644 (file)
@@ -99,11 +99,17 @@ int get_attribute_bitnum_by_name(const char *att_name, unsigned char *bitnum)
        return 1;
 }
 
+/**
+ * Flags used by the lsatt command.
+ *
+ * \param \sa com_lsatt().
+ */
 enum lsatt_flags {
        /** Whether "-a" was given for the lsatt command. */
        LSATT_FLAG_SORT_BY_ID = 1,
        /** Whether "-l" was given for the lsatt command. */
        LSATT_FLAG_LONG = 2,
+       /** Reverse sort order. */
        LSATT_FLAG_REVERSE = 4
 };
 
@@ -356,14 +362,15 @@ static int remove_attribute(struct osl_table *table, struct osl_row *row,
                const char *name, void *data)
 {
        struct remove_attribute_action_data *raad = data;
-       int ret = osl_del_row(table, row);
        unsigned char bitnum;
+       int ret;
 
+       ret = get_attribute_bitnum_by_name(name, &bitnum);
        if (ret < 0) {
                para_printf(&raad->pb, "%s: %s\n", name, PARA_STRERROR(-ret));
                return 1;
        }
-       ret = get_attribute_bitnum_by_name(name, &bitnum);
+       ret = osl_del_row(table, row);
        if (ret < 0) {
                para_printf(&raad->pb, "%s: %s\n", name, PARA_STRERROR(-ret));
                return 1;