projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
update ppc atomic code to match the endian-agnostic version on other archs
[musl]
/
src
/
unistd
/
ttyname_r.c
diff --git
a/src/unistd/ttyname_r.c
b/src/unistd/ttyname_r.c
index
f86fbd9
..
2255e2d
100644
(file)
--- a/
src/unistd/ttyname_r.c
+++ b/
src/unistd/ttyname_r.c
@@
-15,5
+15,8
@@
int ttyname_r(int fd, char *name, size_t size)
if (l < 0) return errno;
else if (l == size) return ERANGE;
- else return 0;
+ else {
+ name[l] = 0;
+ return 0;
+ }
}