summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorVeres Lajos <vlajos@gmail.com>2013-07-13 13:37:04 +0100
committerStanislav Malyshev <stas@php.net>2013-07-15 00:23:03 -0700
commite9a95d78ef7c43bc6b6478b9370047d854b20024 (patch)
tree88ee26fa1c879679a234deb87973a3acd0ff3382 /main
parentb79b13b4efbf3374ec7d28286b29928f43da6d1d (diff)
downloadphp-git-e9a95d78ef7c43bc6b6478b9370047d854b20024.tar.gz
typo fixes
Diffstat (limited to 'main')
-rw-r--r--main/snprintf.h6
-rw-r--r--main/spprintf.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/main/snprintf.h b/main/snprintf.h
index de03542cad..f4ed4d234d 100644
--- a/main/snprintf.h
+++ b/main/snprintf.h
@@ -27,7 +27,7 @@ sprintf offers the ability to make a lot of failures since it does not know
the size of the buffer it uses. Therefore usage of sprintf often
results in possible entries for buffer overrun attacks. So please
use this version only if you are sure the call is safe. sprintf
- allways terminstes the buffer it writes to.
+ always terminstes the buffer it writes to.
snprintf knows the buffers size and will not write behind it. But you will
have to use either a static buffer or allocate a dynamic buffer
@@ -48,7 +48,7 @@ spprintf is the dynamical version of snprintf. It allocates the buffer in size
snprintf and offers possible memory leakes if you miss freeing the
buffer allocated by the function. Therfore this function should be
used where either no maximum is known or the maximum is much bigger
- than normal size required. spprintf allways terminates the buffer.
+ than normal size required. spprintf always terminates the buffer.
Example:
@@ -60,7 +60,7 @@ Example:
sprintf(buffer, "test"); | snprintf(buffer, MAX, "test"); | spprintf(&buffer, MAX, "text");
| | if (!buffer)
| | return OUT_OF_MEMORY
- // sprintf allways terminates | // manual termination of | // spprintf allays terminates buffer
+ // sprintf always terminates | // manual termination of | // spprintf allays terminates buffer
// buffer | // buffer *IS* required |
| buffer[MAX-1] = 0; |
action_with_buffer(buffer); | action_with_buffer(buffer); | action_with_buffer(buffer);
diff --git a/main/spprintf.h b/main/spprintf.h
index 397928a794..d9aa9533e5 100644
--- a/main/spprintf.h
+++ b/main/spprintf.h
@@ -22,7 +22,7 @@
The pbuf parameter of all spprintf version receives a pointer to the allocated
buffer. This buffer must be freed manually after usage using efree() function.
-The buffer will allways be terminated by a zero character. When pbuf is NULL
+The buffer will always be terminated by a zero character. When pbuf is NULL
the function can be used to calculate the required size of the buffer but for
that purpose snprintf is faster. When both pbuf and the return value are 0
than you are out of memory.