projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dab441a
)
fix confstr return value
author
Timo Teräs
<timo.teras@iki.fi>
Wed, 19 Feb 2014 07:40:35 +0000
(09:40 +0200)
committer
Rich Felker
<dalias@aerifal.cx>
Mon, 24 Mar 2014 21:33:54 +0000
(17:33 -0400)
per the specification, the terminating null byte is counted.
src/conf/confstr.c
patch
|
blob
|
history
diff --git
a/src/conf/confstr.c
b/src/conf/confstr.c
index 4332f7262beac7b64b80c9986a355bbe9f9e5c98..6e9c23a0812284088fa4bf54d3036d69b006a0a0 100644
(file)
--- a/
src/conf/confstr.c
+++ b/
src/conf/confstr.c
@@
-13,5
+13,5
@@
size_t confstr(int name, char *buf, size_t len)
}
// snprintf is overkill but avoid wasting code size to implement
// this completely useless function and its truncation semantics
- return snprintf(buf, len, "%s", s);
+ return snprintf(buf, len, "%s", s)
+ 1
;
}