X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=attribute.c;h=569c8922c23c1412284eedd2a17f54b7d98ec457;hp=bfb6d3f2765749be1147b430439bb78dfe3d8d8a;hb=a6cbab95272b31c55b2b41e1d3dd55743c7c774f;hpb=49bd626084bf5f48e4d80075258b6da4703752cf diff --git a/attribute.c b/attribute.c index bfb6d3f2..569c8922 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. */ @@ -166,7 +166,7 @@ static void com_lsatt_callback(int fd, const struct osl_object *query) if (laad.flags & LSATT_FLAG_REVERSE) pmd.pm_flags |= PM_REVERSE_LOOP; for_each_matching_row(&pmd); - if (!laad.pb.offset) + if (laad.pb.offset) pass_buffer_as_shm(laad.pb.buf, laad.pb.offset, &fd); free(laad.pb.buf); } @@ -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)