From: Andre Noll Date: Sat, 29 Sep 2007 13:31:35 +0000 (+0200) Subject: attribute.c: Fix com_rmatt(). X-Git-Tag: v0.3.0~321 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=bd4ab2d82dec95a4deb2455c0e3394db3e0d3bc5 attribute.c: Fix com_rmatt(). We have to get the bit number _before_ we remove the row. --- diff --git a/attribute.c b/attribute.c index 694a962b..671ca056 100644 --- a/attribute.c +++ b/attribute.c @@ -356,14 +356,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;