Print this page
7126 NSS_XbyY_FINI has too much logic for a function-like macro

Split Close
Expand all
Collapse all
          --- old/usr/src/head/nss_dbdefs.h
          +++ new/usr/src/head/nss_dbdefs.h
↓ open down ↓ 661 lines elided ↑ open up ↑
 662  662          (str)->buf.buffer = (bufp),                     \
 663  663          (str)->buf.buflen = (len),                      \
 664  664          (str)->stayopen  = 0,                           \
 665  665          (str)->str2ent  = (func),                       \
 666  666          (str)->key2str  = (kfunc),                      \
 667  667          (str)->returnval = 0,                           \
 668  668          (str)->returnlen = 0,                           \
 669  669          (str)->h_errno    = 0,                          \
 670  670          (str)->erange    = 0)
 671  671  
 672      -#define NSS_XbyY_FINI(str)                              (\
 673      -        (str)->returnval == 0 && (str)->erange && (errno = ERANGE), \
 674      -        (str)->returnval)
      672 +#define NSS_XbyY_FINI(str)      _nss_XbyY_fini(str)
 675  673  
 676  674  #define NSS_PACKED_CRED_CHECK(buf, ruid, euid)          (\
 677  675          ((nss_pheader_t *)(buf))->p_ruid == (ruid) && \
 678  676          ((nss_pheader_t *)(buf))->p_euid == (euid))
 679  677  
      678 +extern void             *_nss_XbyY_fini(nss_XbyY_args_t *);
 680  679  extern char             **_nss_netdb_aliases(const char *, int, char *, int);
 681  680  extern nss_status_t     nss_default_key2str(void *, size_t, nss_XbyY_args_t *,
 682  681                                          const char *, int, size_t *);
 683  682  extern nss_status_t     nss_packed_arg_init(void *, size_t, nss_db_root_t *,
 684  683                                          nss_db_initf_t *, int *,
 685  684                                          nss_XbyY_args_t *);
 686  685  extern nss_status_t     nss_packed_context_init(void *, size_t, nss_db_root_t *,
 687  686                                          nss_db_initf_t *, nss_getent_t **,
 688  687                                          nss_XbyY_args_t *);
 689  688  extern void             nss_packed_set_status(void *, size_t, nss_status_t,
↓ open down ↓ 135 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX