X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=attribute.c;h=d22511de76f92f19835b6c5c57faa54ba9360eab;hp=e7fba9021d29fc19fcc7ad0d09534c65914d3a56;hb=002731cd3938f3be6b71651e56c062af1adcdec0;hpb=a5df177eedf4f95204a45a7e7dc683b1e3f828bc diff --git a/attribute.c b/attribute.c index e7fba902..d22511de 100644 --- a/attribute.c +++ b/attribute.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1997-2008 Andre Noll + * Copyright (C) 1997-2009 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -301,9 +301,9 @@ static void com_addatt_callback(int fd, const struct osl_object *query) struct osl_object objs[NUM_ATT_COLUMNS]; struct osl_row *row; unsigned char bitnum; - len = strlen(p); struct addatt_event_data aed; + len = strlen(p); if (!len || p[len - 1] == '-' || p[len - 1] == '+') { ret2 = para_printf(&pb, "invalid attribute name: %s\n", p); if (ret2 < 0) @@ -343,7 +343,7 @@ static void com_addatt_callback(int fd, const struct osl_object *query) aed.name = p; aed.bitnum = bitnum; afs_event(ATTRIBUTE_ADD, &pb, &aed); - greatest_att_bitnum = PARA_MAX(greatest_att_bitnum, bitnum); + greatest_att_bitnum = PARA_MAX(greatest_att_bitnum, (int)bitnum); } out: if (ret < 0 && ret2 >= 0) @@ -598,7 +598,11 @@ static int attribute_create(const char *dir) return osl_create_table(&attribute_table_desc); } - +/** + * Initialize the attribute table structure. + * + * \param t The table structure to initialize. + */ void attribute_init(struct afs_table *t) { t->name = attribute_table_desc.name;