develooper Front page | perl.perl5.porters | Postings from November 2010

[perl #78836] vms/vms.c: dubious expressions

Thread Next
From:
Nicolas Kaiser
Date:
November 5, 2010 21:51
Subject:
[perl #78836] vms/vms.c: dubious expressions
Message ID:
rt-3.6.HEAD-4263-1288969738-54.78836-75-0@perl.org
# New Ticket Created by  Nicolas Kaiser 
# Please include the string:  [perl #78836]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=78836 >


This is a bug report for perl from nikai@nikai.net,
generated with the help of perlbug 1.39 running under perl 5.12.2.


-----------------------------------------------------------------
Hi there!

I noticed two dubious expressions that look as if they were
intended to be assignments. The comment above the code says
it's broken.

Best regards,
Nicolas Kaiser
---
diff -u -p a/perl-5.12.2/vms/vms.c b/perl-5.12.2/vms/vms.c
--- a/perl-5.12.2/vms/vms.c 2010-09-07 01:30:32.000000000 +0200
+++ b/perl-5.12.2/vms/vms.c 2010-11-05 14:50:28.798317712 +0100
@@ -732,8 +732,8 @@ int scnt;
 	    if (scnt == 4) {
 		unsigned int c1, c2;
 		scnt = sscanf(inspec, "%2x%2x", &c1, &c2);
-		outspec[0] == c1 & 0xff;
-		outspec[1] == c2 & 0xff;
+		outspec[0] = c1 & 0xff;
+		outspec[1] = c2 & 0xff;
 		if (scnt > 1) {
 		    (*output_cnt) += 2;
 		    count += 4;
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=medium
---
Site configuration information for perl 5.12.2:

Configured by Gentoo at Mon Oct 25 20:50:10 CEST 2010.


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About