summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-06-18 17:55:28 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2013-06-18 17:55:28 +0000
commit5f1b998d9e41e712a0f3b6c9c929bfb48c9d1f7b (patch)
tree034af24412f8db212254129fe0bcd6699aa71dd4
parent4381040f43c2d1887aea1c1ca8da8e75935db815 (diff)
parentb6f4a7a95faa546c68aac2bdecae42c6f9120be0 (diff)
downloadandroid_external_elfutils-5f1b998d9e41e712a0f3b6c9c929bfb48c9d1f7b.tar.gz
android_external_elfutils-5f1b998d9e41e712a0f3b6c9c929bfb48c9d1f7b.tar.bz2
android_external_elfutils-5f1b998d9e41e712a0f3b6c9c929bfb48c9d1f7b.zip
Merge "Revert "Change getline to not count the null terminator""
-rw-r--r--bionic-fixup/getline.c4
-rw-r--r--host-darwin-fixup/getline.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/bionic-fixup/getline.c b/bionic-fixup/getline.c
index df07e81b..041a5ed9 100644
--- a/bionic-fixup/getline.c
+++ b/bionic-fixup/getline.c
@@ -44,6 +44,6 @@ ssize_t getline(char **lineptr, size_t *n, FILE *stream)
/* Write the NULL character */
(*lineptr)[len-1] = '\0';
- /* Return the length of the new buffer not counting the null character */
- return len-1;
+ /* Return the length of the new buffer */
+ return len;
}
diff --git a/host-darwin-fixup/getline.c b/host-darwin-fixup/getline.c
index df07e81b..041a5ed9 100644
--- a/host-darwin-fixup/getline.c
+++ b/host-darwin-fixup/getline.c
@@ -44,6 +44,6 @@ ssize_t getline(char **lineptr, size_t *n, FILE *stream)
/* Write the NULL character */
(*lineptr)[len-1] = '\0';
- /* Return the length of the new buffer not counting the null character */
- return len-1;
+ /* Return the length of the new buffer */
+ return len;
}