[PATCH] Fix status in main

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Fix status in main

Steve Grubb
Hello,

This is a patch to fix what appears to be a simple typo. The warning says
"invalid status assuming 0", but then instead sets runLast to 0.

Signed-of-by: Steve Grubb <[hidden email]>

Index: src/main/main.c
===================================================================
--- src/main/main.c (revision 72935)
+++ src/main/main.c (working copy)
@@ -1341,7 +1341,7 @@
     status = asInteger(CADR(args));
     if (status == NA_INTEGER) {
  warning(_("invalid 'status', 0 assumed"));
- runLast = 0;
+ status = 0;
     }
     runLast = asLogical(CADDR(args));
     if (runLast == NA_LOGICAL) {

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Fix status in main

Martin Morgan-3
On 07/20/2017 05:31 PM, Steve Grubb wrote:
> Hello,
>
> This is a patch to fix what appears to be a simple typo. The warning says
> "invalid status assuming 0", but then instead sets runLast to 0.
>
> Signed-of-by: Steve Grubb <[hidden email]>

fixed in 72938 / 39.

This seemed not to have consequence, since exit() reports NA & 0377
(i.e., 0) and the incorrect assignment to runLast is immediately
over-written by the correct value.

Martin Morgan

>
> Index: src/main/main.c
> ===================================================================
> --- src/main/main.c (revision 72935)
> +++ src/main/main.c (working copy)
> @@ -1341,7 +1341,7 @@
>       status = asInteger(CADR(args));
>       if (status == NA_INTEGER) {
>   warning(_("invalid 'status', 0 assumed"));
> - runLast = 0;
> + status = 0;
>       }
>       runLast = asLogical(CADDR(args));
>       if (runLast == NA_LOGICAL) {
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>


This email message may contain legally privileged and/or...{{dropped:2}}

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Fix status in main

Martin Maechler
In reply to this post by Steve Grubb

> Hello,
> This is a patch to fix what appears to be a simple typo. The warning says
> "invalid status assuming 0", but then instead sets runLast to 0.

> Signed-of-by: Steve Grubb <[hidden email]>

> Index: src/main/main.c
> ===================================================================
> --- src/main/main.c (revision 72935)
> +++ src/main/main.c (working copy)
> @@ -1341,7 +1341,7 @@
>      status = asInteger(CADR(args));
>      if (status == NA_INTEGER) {
>   warning(_("invalid 'status', 0 assumed"));
> - runLast = 0;
> + status = 0;
>      }
>      runLast = asLogical(CADDR(args));
>      if (runLast == NA_LOGICAL) {

Yes, thank you!

Martin

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel