Changeset d02ddd5 in rtems


Ignore:
Timestamp:
May 25, 2010, 2:12:53 PM (9 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, master
Children:
862b24a
Parents:
75d15858
Message:

2010-05-25 Ralf Corsépius <ralf.corsepius@…>

  • librpc/src/rpc/rpc_prot.c: Partial merger from freebsd (Improved 64 bit compatibility; bug fix).
Location:
cpukit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r75d15858 rd02ddd5  
     12010-05-25      Ralf Corsépius <ralf.corsepius@rtems.org>
     2
     3        * librpc/src/rpc/rpc_prot.c: Partial merger from freebsd
     4        (Improved 64 bit compatibility; bug fix).
     5
    162010-05-23      Ralf Corsépius <ralf.corsepius@rtems.org>
    27
  • cpukit/librpc/src/rpc/rpc_prot.c

    r75d15858 rd02ddd5  
    5151#endif
    5252
     53#include <assert.h>
    5354#include <sys/param.h>
    5455
     
    7172        struct opaque_auth *ap)
    7273{
     74
     75        assert(xdrs != NULL);
     76        assert(ap != NULL);
    7377
    7478        if (xdr_enum(xdrs, &(ap->oa_flavor)))
     
    8690        des_block *blkp)
    8791{
     92
     93        assert(xdrs != NULL);
     94        assert(blkp != NULL);
     95
    8896        return (xdr_opaque(xdrs, (caddr_t)blkp, sizeof(des_block)));
    8997}
     
    119127        case PROC_UNAVAIL:
    120128        case PROG_UNAVAIL:
    121 /*      default: */
    122129                break;
    123130        }
     
    204211{
    205212
     213        assert(error != NULL);
     214
    206215        switch (acpt_stat) {
    207216
     
    232241        /* something's wrong, but we don't know what ... */
    233242        error->re_status = RPC_FAILED;
    234         error->re_lb.s1 = (long)MSG_ACCEPTED;
    235         error->re_lb.s2 = (long)acpt_stat;
     243        error->re_lb.s1 = (int32_t)MSG_ACCEPTED;
     244        error->re_lb.s2 = (int32_t)acpt_stat;
    236245}
    237246
     
    242251{
    243252
     253        assert(error != NULL);
     254
    244255        switch (rjct_stat) {
    245 
    246         case RPC_VERSMISMATCH:
     256        case RPC_MISMATCH:
    247257                error->re_status = RPC_VERSMISMATCH;
    248258                return;
     
    251261                error->re_status = RPC_AUTHERROR;
    252262                return;
    253         default:
    254                 break;
    255263        }
    256264        /* something's wrong, but we don't know what ... */
    257265        error->re_status = RPC_FAILED;
    258         error->re_lb.s1 = (long)MSG_DENIED;
    259         error->re_lb.s2 = (long)rjct_stat;
     266        error->re_lb.s1 = (int32_t)MSG_DENIED;
     267        error->re_lb.s2 = (int32_t)rjct_stat;
    260268}
    261269
     
    268276        struct rpc_err *error)
    269277{
     278
     279        assert(msg != NULL);
     280        assert(error != NULL);
    270281
    271282        /* optimized for normal, SUCCESSful case */
     
    286297        default:
    287298                error->re_status = RPC_FAILED;
    288                 error->re_lb.s1 = (long)(msg->rm_reply.rp_stat);
     299                error->re_lb.s1 = (int32_t)(msg->rm_reply.rp_stat);
    289300                break;
    290301        }
Note: See TracChangeset for help on using the changeset viewer.