summaryrefslogtreecommitdiffstats
path: root/libssh/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'libssh/string.c')
-rw-r--r--libssh/string.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libssh/string.c b/libssh/string.c
index 10bb224..2574368 100644
--- a/libssh/string.c
+++ b/libssh/string.c
@@ -49,7 +49,6 @@ struct string_struct *string_new(size_t size) {
if (str == NULL) {
return NULL;
}
- ZERO_STRUCTP(str);
str->size = htonl(size);
return str;
@@ -103,7 +102,7 @@ struct string_struct *string_from_char(const char *what) {
*/
size_t string_len(struct string_struct *s) {
if (s == NULL) {
- return 0;
+ return ntohl(0);
}
return ntohl(s->size);