ld: remove stray debug fprintf

Message ID 20210204175106.156537-1-andrew.burgess@embecosm.com
State New
Headers show
Series
  • ld: remove stray debug fprintf
Related show

Commit Message

Andrew Burgess Feb. 4, 2021, 5:51 p.m.
In this commit:

  commit ace667e59aede65c400381f1cff704b61e8ccb0b
  Date:   Mon Jul 18 21:00:00 2016 +0100

      ld: Restore file offset after a plugin fails to claim a file

I inadvertently left in a stray fprintf call.  Removed in this commit.

ld/ChangeLog:

	* testplugin.c (record_read_length): Remove debug fprintf.
---
 ld/ChangeLog  | 4 ++++
 ld/testplug.c | 5 +----
 2 files changed, 5 insertions(+), 4 deletions(-)

-- 
2.25.4

Comments

Andrew Burgess Feb. 18, 2021, 10:37 a.m. | #1
* Andrew Burgess <andrew.burgess@embecosm.com> [2021-02-04 17:51:06 +0000]:

> In this commit:

> 

>   commit ace667e59aede65c400381f1cff704b61e8ccb0b

>   Date:   Mon Jul 18 21:00:00 2016 +0100

> 

>       ld: Restore file offset after a plugin fails to claim a file

> 

> I inadvertently left in a stray fprintf call.  Removed in this commit.

> 

> ld/ChangeLog:

> 

> 	* testplugin.c (record_read_length): Remove debug fprintf.


I've now pushed this as an obvious fix.

Thanks,
Andrew


> ---

>  ld/ChangeLog  | 4 ++++

>  ld/testplug.c | 5 +----

>  2 files changed, 5 insertions(+), 4 deletions(-)

> 

> diff --git a/ld/testplug.c b/ld/testplug.c

> index 483f0f0edf9..645004ef177 100644

> --- a/ld/testplug.c

> +++ b/ld/testplug.c

> @@ -176,10 +176,7 @@ record_read_length (const char *length)

>    while (*tmp != '\0' && isdigit (*tmp))

>      ++tmp;

>    if (*tmp != '\0' || *length == '\0')

> -    {

> -      fprintf (stderr, "APB: Bad length string: %s\n", tmp);

> -      return LDPS_ERR;

> -    }

> +    return LDPS_ERR;

>  

>    bytes_to_read_before_claim = atoi (length);

>    return LDPS_OK;

> -- 

> 2.25.4

>

Patch

diff --git a/ld/testplug.c b/ld/testplug.c
index 483f0f0edf9..645004ef177 100644
--- a/ld/testplug.c
+++ b/ld/testplug.c
@@ -176,10 +176,7 @@  record_read_length (const char *length)
   while (*tmp != '\0' && isdigit (*tmp))
     ++tmp;
   if (*tmp != '\0' || *length == '\0')
-    {
-      fprintf (stderr, "APB: Bad length string: %s\n", tmp);
-      return LDPS_ERR;
-    }
+    return LDPS_ERR;
 
   bytes_to_read_before_claim = atoi (length);
   return LDPS_OK;