Actually, that patch will break the intended functionality :(.
Does the attached patch fix VC++'s complaint?
If not, the offending statement should be broken into:
if (called)
called_ssn = ssn;
else
calling_ssn = ssn;
Motonori Shindo wrote:
>
> Hi,
>
> The enclosed patch will stop Visual C++ to complain about the lvalue
> of assignment.
>
> Regards,
>
> =--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=
> +----+----+
> |.. .| | Motonori Shindo
> |_~__| |
> | .. |~~_~| Sr. Systems Engineer
> | . | | CoSine Communications Inc.
> +----+----+
> C o S i n e e-mail: mshindo@xxxxxxxxxxxxx
> Communications
> =--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=
>
> ------------------------------------------------------------------------
> Index: packet-sccp.c
> ===================================================================
> RCS file: /cvsroot/ethereal/packet-sccp.c,v
> retrieving revision 1.2
> diff -u -r1.2 packet-sccp.c
> --- packet-sccp.c 2002/03/05 00:09:21 1.2
> +++ packet-sccp.c 2002/03/06 10:33:26
> @@ -902,7 +902,7 @@
> /* Dissect SSN (if present) */
> if (ssni) {
> ssn = tvb_get_guint8(tvb, offset);
> - called ? called_ssn : calling_ssn = ssn;
> + called ? called_ssn : (calling_ssn = ssn);
>
> proto_tree_add_uint(call_tree, called ? hf_sccp_called_ssn
> : hf_sccp_calling_ssn,
> @@ -944,7 +944,7 @@
> /* Dissect SSN (if present) */
> if (ssni) {
> ssn = tvb_get_guint8(tvb, offset);
> - called ? called_ssn : calling_ssn = ssn;
> + called ? called_ssn : (calling_ssn = ssn);
>
> proto_tree_add_uint(call_tree, called ? hf_sccp_called_ssn
> : hf_sccp_calling_ssn,
>
> ------------------------------------------------------------------------
> Name: sanitizer.log
> sanitizer.log Type: Text Document (application/x-unknown-content-type-txtfile)
> Encoding: 8bit
Index: packet-sccp.c
===================================================================
RCS file: /cvsroot/ethereal/packet-sccp.c,v
retrieving revision 1.2
diff -u -r1.2 packet-sccp.c
--- packet-sccp.c 2002/03/05 00:09:21 1.2
+++ packet-sccp.c 2002/03/06 16:56:31
@@ -902,7 +902,7 @@
/* Dissect SSN (if present) */
if (ssni) {
ssn = tvb_get_guint8(tvb, offset);
- called ? called_ssn : calling_ssn = ssn;
+ (called ? called_ssn : calling_ssn) = ssn;
proto_tree_add_uint(call_tree, called ? hf_sccp_called_ssn
: hf_sccp_calling_ssn,
@@ -944,7 +944,7 @@
/* Dissect SSN (if present) */
if (ssni) {
ssn = tvb_get_guint8(tvb, offset);
- called ? called_ssn : calling_ssn = ssn;
+ (called ? called_ssn : calling_ssn) = ssn;
proto_tree_add_uint(call_tree, called ? hf_sccp_called_ssn
: hf_sccp_calling_ssn,
begin:vcard
n:Morriss;Jeff
tel;fax:+1-856-222-9947
tel;work:+1-856-787-2824
x-mozilla-html:FALSE
url:http://www.ulticom.com
org:Ulticom, Inc.;Customer Support
version:2.1
email;internet:jeff.morriss[AT]ulticom.com
title:Senior Support Engineer
adr;quoted-printable:;;Ulticom, Inc.=0D=0A1020 Briggs Rd.=0D=0A;Mount Laurel;NJ;08054;USA
fn:Jeff Morriss
end:vcard