Print this page
10103 libmlrpc needs smatch fixes

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libmlrpc/common/ndr_server.c
          +++ new/usr/src/lib/libmlrpc/common/ndr_server.c
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  23   23   * Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
       24 + * Copyright (c) 2018, Joyent, Inc.
  24   25   */
  25   26  
  26   27  /*
  27   28   * Server side RPC handler.
  28   29   */
  29   30  
  30   31  #include <sys/byteorder.h>
  31   32  #include <sys/uio.h>
  32   33  #include <errno.h>
  33   34  #include <synch.h>
↓ open down ↓ 599 lines elided ↑ open up ↑
 633  634   * was in the response header with the fault information.
 634  635   */
 635  636  static void
 636  637  ndr_reply_fault(ndr_xa_t *mxa, unsigned long drc)
 637  638  {
 638  639          ndr_common_header_t *rhdr = &mxa->recv_hdr.common_hdr;
 639  640          ndr_common_header_t *hdr = &mxa->send_hdr.common_hdr;
 640  641          ndr_stream_t *nds = &mxa->send_nds;
 641  642          unsigned long fault_status;
 642  643  
 643      -        NDS_RESET(nds);
      644 +        (void) NDS_RESET(nds);
 644  645  
 645  646          hdr->rpc_vers = 5;
 646  647          hdr->rpc_vers_minor = 0;
 647  648          hdr->pfc_flags = NDR_PFC_FIRST_FRAG + NDR_PFC_LAST_FRAG;
 648  649          hdr->packed_drep = rhdr->packed_drep;
 649  650          hdr->frag_length = sizeof (mxa->send_hdr.fault_hdr);
 650  651          hdr->auth_length = 0;
 651  652          hdr->call_id = rhdr->call_id;
 652  653  #ifdef _BIG_ENDIAN
 653  654          hdr->packed_drep.intg_char_rep = NDR_REPLAB_CHAR_ASCII
↓ open down ↓ 147 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX