diff mbox

[1/2] manual/memory.texi: Remove register keyword from examples.

Message ID 527A14AB.50807@linaro.org
State Accepted
Headers show

Commit Message

Will Newton Nov. 6, 2013, 10:06 a.m. UTC
The register keyword doesn't add any information to the examples
and is not useful for modern compilers.

ChangeLog:

2013-11-02  Will Newton  <will.newton@linaro.org>

	* manual/memory.texi (Malloc Examples): Remove register
	keyword from examples.
---
 manual/memory.texi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Ondřej Bílka Nov. 6, 2013, 10:17 a.m. UTC | #1
On Wed, Nov 06, 2013 at 10:06:35AM +0000, Will Newton wrote:
> 
> The register keyword doesn't add any information to the examples
> and is not useful for modern compilers.
> 
> ChangeLog:
> 
> 2013-11-02  Will Newton  <will.newton@linaro.org>
> 
> 	* manual/memory.texi (Malloc Examples): Remove register
> 	keyword from examples.

ok
diff mbox

Patch

diff --git a/manual/memory.texi b/manual/memory.texi
index 0c3d39e..a80f87c 100644
--- a/manual/memory.texi
+++ b/manual/memory.texi
@@ -355,7 +355,7 @@  it is:
 void *
 xmalloc (size_t size)
 @{
-  register void *value = malloc (size);
+  void *value = malloc (size);
   if (value == 0)
     fatal ("virtual memory exhausted");
   return value;
@@ -371,7 +371,7 @@  a newly allocated null-terminated string:
 char *
 savestring (const char *ptr, size_t len)
 @{
-  register char *value = (char *) xmalloc (len + 1);
+  char *value = (char *) xmalloc (len + 1);
   value[len] = '\0';
   return (char *) memcpy (value, ptr, len);
 @}
@@ -502,7 +502,7 @@  as @code{xmalloc} does for @code{malloc}:
 void *
 xrealloc (void *ptr, size_t size)
 @{
-  register void *value = realloc (ptr, size);
+  void *value = realloc (ptr, size);
   if (value == 0)
     fatal ("Virtual memory exhausted");
   return value;