Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP3:Update
opensm
opensm-type_punning.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File opensm-type_punning.patch of Package opensm
--- opensm/osm_prtn_config.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) Index: opensm/osm_prtn_config.c =================================================================== --- opensm/osm_prtn_config.c.orig 2016-03-21 13:35:46.885676645 +0100 +++ opensm/osm_prtn_config.c 2016-03-21 13:38:04.488939219 +0100 @@ -120,16 +120,18 @@ static inline boolean_t mgid_is_broadcas static inline boolean_t mgid_is_ip(const ib_gid_t *mgid) { - ib_net16_t ipsig = *(ib_net16_t *)&mgid->raw[2]; - return (ipsig == cl_hton16(0x401b) || ipsig == cl_hton16(0x601b)); + union{uint8_t *ibg; ib_net16_t *ibn; }pun = { &mgid->raw[2]}; + return (*pun.ibn == cl_hton16(0x401b) || *pun.ibn == cl_hton16(0x601b)); } static inline boolean_t ip_mgroup_pkey_ok(struct part_conf *conf, struct precreate_mgroup *group) { - ib_net16_t mpkey = *(ib_net16_t *)&group->mgid.raw[4]; + ib_net16_t mpkey; + union{uint8_t *uip; ib_net16_t *ibn} pun = { &group->mgid.raw[2]}; char gid_str[INET6_ADDRSTRLEN]; + mpkey = *pun.ibn; if (mgid_is_broadcast(&group->mgid) /* user requested "wild card" of pkey */ || mpkey == 0x0000
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor