This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
RT 78836: vms/vms.c: dubious expressions
authorNicolas Kaiser <nikai@nikai.net>
Sat, 6 Nov 2010 16:54:52 +0000 (11:54 -0500)
committerCraig A. Berry <craigberry@mac.com>
Sat, 6 Nov 2010 16:54:52 +0000 (11:54 -0500)
I noticed two dubious expressions that look as if they were
intended to be assignments. The comment above the code says
it's broken.

vms/vms.c

index 9ca1e96..7801873 100644 (file)
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -655,8 +655,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;