]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - attribute.c
Improve help/man page of para_filter.
[paraslash.git] / attribute.c
index e7fba9021d29fc19fcc7ad0d09534c65914d3a56..655c286697a6ca68c94da410ec5841276dd97ef5 100644 (file)
@@ -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;
                struct osl_object objs[NUM_ATT_COLUMNS];
                struct osl_row *row;
                unsigned char bitnum;
-               len = strlen(p);
                struct addatt_event_data aed;
 
                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)
                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);
                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)
        }
 out:
        if (ret < 0 && ret2 >= 0)