diff options
author | Gerald Carter <jerry@samba.org> | 2005-03-09 22:20:40 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:55:56 -0500 |
commit | a6c895de85b8f1d2368515b58b7d02541954a190 (patch) | |
tree | 6f49e28cf61084c9047a456bd184779b35d9d399 /source3/nmbd/nmbd_winsproxy.c | |
parent | 779191f26066934773b00e1ba55df635e5c6851e (diff) | |
download | samba-a6c895de85b8f1d2368515b58b7d02541954a190.tar.gz |
r5717: BUG 2215: horrible code in nmbd_winsproxy.c; gcc folks at redhat claim its in violation of the C spec. It's so horrible I believe them
(This used to be commit fa7eb5693314efb14d42a739f8006ddf8d41e9d5)
Diffstat (limited to 'source3/nmbd/nmbd_winsproxy.c')
-rw-r--r-- | source3/nmbd/nmbd_winsproxy.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source3/nmbd/nmbd_winsproxy.c b/source3/nmbd/nmbd_winsproxy.c index b01ffcffc16..75319724616 100644 --- a/source3/nmbd/nmbd_winsproxy.c +++ b/source3/nmbd/nmbd_winsproxy.c @@ -190,12 +190,15 @@ void make_wins_proxy_name_query_request( struct subnet_record *subrec, struct packet_struct *incoming_packet, struct nmb_name *question_name) { - long *ud[(sizeof(struct userdata_struct) + sizeof(struct subrec *) + - sizeof(struct packet_struct *))/sizeof(long *) + 1]; - struct userdata_struct *userdata = (struct userdata_struct *)ud; + union { + struct userdata_struct ud; + char c[sizeof(struct userdata_struct) + sizeof(struct subrec *) + + sizeof(struct packet_struct *)+sizeof(long*)]; + } ud; + struct userdata_struct *userdata = &ud.ud; unstring qname; - memset(ud, '\0', sizeof(ud)); + memset(&ud, '\0', sizeof(ud)); userdata->copy_fn = wins_proxy_userdata_copy_fn; userdata->free_fn = wins_proxy_userdata_free_fn; |