Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH] vms/vms.c: fix unused relational comparison result #17107

Open
p5pRT opened this issue Jul 24, 2019 · 4 comments
Open

[PATCH] vms/vms.c: fix unused relational comparison result #17107

p5pRT opened this issue Jul 24, 2019 · 4 comments

Comments

@p5pRT
Copy link

p5pRT commented Jul 24, 2019

Migrated from rt.perl.org#134307 (status was 'open')

Searchable as RT134307$

@p5pRT
Copy link
Author

p5pRT commented Jul 24, 2019

From alexandr.savca89@gmail.com


vms/vms.c​: fix unused relational comparison result



Flags​:
  category=core
  severity=low
  Type=Patch
  PatchStatus=HasPatch


@p5pRT
Copy link
Author

p5pRT commented Jul 24, 2019

From alexandr.savca89@gmail.com

0001-vms-vms.c-fix-unused-relational-comparison-result.patch
From 090a7617c71758f9929da2b321ffa13f23bcb631 Mon Sep 17 00:00:00 2001
From: Alexandr Savca <alexandr.savca89@gmail.com>
Date: Wed, 24 Jul 2019 12:13:05 +0300
Subject: [PATCH] vms/vms.c: fix unused relational comparison result

---
 vms/vms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vms/vms.c b/vms/vms.c
index 9dcefa3e13..050af991f5 100644
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -11800,7 +11800,7 @@ encode_dev (pTHX_ const char *dev)
   enc = 0;
   f = 1;
   i = 0;
-  for (q = dev + strlen(dev); q--; q >= dev) {
+  for (q = dev + strlen(dev); q >= dev; q--) {
     if (*q == ':')
 	break;
     if (isdigit (*q))
-- 
2.20.1

@p5pRT
Copy link
Author

p5pRT commented Jul 25, 2019

From @craigberry

On Wed, Jul 24, 2019 at 4​:20 AM Alexandr Savca (via RT)
<perlbug-followup@​perl.org> wrote​:

# New Ticket Created by Alexandr Savca
# Please include the string​: [perl #134307]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=134307 >

-----------------------------------------------------------------
vms/vms.c​: fix unused relational comparison result

Thanks, applied​:
<https://perl5.git.perl.org/perl.git/commitdiff/17d9d1f083f91c980b13920c53e48ffc00bf7c63>

That particular blooper has been there at least since 5.004. It's
fallback code that only fires if another mechanism fails, and there is
a separate counter that limits the number of loop iterations to 6, so
I don't think it ever did any damage, but better to have it fixed.

@p5pRT
Copy link
Author

p5pRT commented Jul 25, 2019

The RT System itself - Status changed from 'new' to 'open'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants