checked in
On 11/10/05, Albert Chin <ethereal-dev@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> epan/stream.c makes use of C99 initialization which won't work on C89
> compilers like HP-UX 10.20 cc.
>
> --
> albert chin (china@xxxxxxxxxxxxxxxxxx)
>
> -- snip snip
> Index: epan/stream.c
> ===================================================================
> --- epan/stream.c.orig 2005-10-10 08:23:08.000000000 -0500
> +++ epan/stream.c 2005-11-10 15:05:16.066171000 -0600
> @@ -166,14 +166,19 @@
> /* lookup function, returns null if not found */
> static stream_t *stream_hash_lookup_circ( const struct circuit *circuit,
> int p2p_dir )
> {
> - stream_key_t key = {TRUE,{circuit}, p2p_dir};
> + stream_key_t key;
> + key.is_circuit = TRUE;
> + key.circ.circuit = circuit;
> + key.p2p_dir = p2p_dir;
> return (stream_t *)g_hash_table_lookup(stream_hash, &key);
> }
>
> static stream_t *stream_hash_lookup_conv( const struct conversation *conv,
> int p2p_dir )
> {
> - stream_key_t key = {FALSE,{NULL}, p2p_dir};
> + stream_key_t key;
> + key.is_circuit = FALSE;
> key.circ.conv = conv;
> + key.p2p_dir = p2p_dir;
> return (stream_t *)g_hash_table_lookup(stream_hash, &key);
> }
>
> @@ -327,9 +332,13 @@
> /* lookup function, returns null if not found */
> static stream_pdu_fragment_t *fragment_hash_lookup( const stream_t *stream,
> guint32 framenum, guint32 offset )
> {
> - fragment_key_t key = {stream, framenum, offset};
> + fragment_key_t key;
> stream_pdu_fragment_t *val = g_hash_table_lookup(fragment_hash, &key);
>
> + key.stream = stream;
> + key.framenum = framenum;
> + key.offset = offset;
> +
> return val;
> }
>
>
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@xxxxxxxxxxxx
> http://www.ethereal.com/mailman/listinfo/ethereal-dev
>