From 44b55af26f5f189363453a0877cfaf2378754ebb Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Tue, 11 Jul 2023 12:14:17 +0000 Subject: No need to initialize the first element of st->string since it was just calloc(3)-ed a few lines above. OK tb@ --- lib/libc/stdio/open_memstream.c | 3 +-- lib/libc/stdio/open_wmemstream.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/libc') diff --git a/lib/libc/stdio/open_memstream.c b/lib/libc/stdio/open_memstream.c index 7b063e37454..af0169f67f8 100644 --- a/lib/libc/stdio/open_memstream.c +++ b/lib/libc/stdio/open_memstream.c @@ -1,4 +1,4 @@ -/* $OpenBSD: open_memstream.c,v 1.9 2023/06/21 13:11:49 claudio Exp $ */ +/* $OpenBSD: open_memstream.c,v 1.10 2023/07/11 12:14:16 claudio Exp $ */ /* * Copyright (c) 2011 Martin Pieuchot @@ -135,7 +135,6 @@ open_memstream(char **pbuf, size_t *psize) return (NULL); } - *st->string = '\0'; st->pos = 0; st->len = 0; st->pbuf = pbuf; diff --git a/lib/libc/stdio/open_wmemstream.c b/lib/libc/stdio/open_wmemstream.c index 01dd782768d..fca0b7138c6 100644 --- a/lib/libc/stdio/open_wmemstream.c +++ b/lib/libc/stdio/open_wmemstream.c @@ -1,4 +1,4 @@ -/* $OpenBSD: open_wmemstream.c,v 1.9 2023/06/21 13:11:49 claudio Exp $ */ +/* $OpenBSD: open_wmemstream.c,v 1.10 2023/07/11 12:14:16 claudio Exp $ */ /* * Copyright (c) 2011 Martin Pieuchot @@ -145,7 +145,6 @@ open_wmemstream(wchar_t **pbuf, size_t *psize) return (NULL); } - *st->string = L'\0'; st->pos = 0; st->len = 0; st->pbuf = pbuf; -- cgit v1.2.3