[Libreoffice-commits] online.git: test/UnitHTTP.cpp

Jan Holesovsky (via logerrit) logerrit at kemper.freedesktop.org
Wed Nov 13 14:13:08 UTC 2019


 test/UnitHTTP.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3496b07e7e1a43ad960118f166d74d3ece523ac3
Author:     Jan Holesovsky <kendy at collabora.com>
AuthorDate: Wed May 22 20:28:15 2019 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Wed Nov 13 15:12:50 2019 +0100

    Cosmetic change in a memset invocation.
    
    For an array, memset(array, ...) and memset(&array, ...) do the same
    thing - but given that there has to be the sizeof(array), the former
    is probably more readable / obvious here.
    
    Change-Id: I7e329cb1dcabb564e26857b0c7d9f88431bb4ede
    Reviewed-on: https://gerrit.libreoffice.org/82601
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    Tested-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/test/UnitHTTP.cpp b/test/UnitHTTP.cpp
index 8d03b311f..060f0c3fa 100644
--- a/test/UnitHTTP.cpp
+++ b/test/UnitHTTP.cpp
@@ -93,7 +93,7 @@ public:
     bool expectString(const std::shared_ptr<Poco::Net::StreamSocket> &socket, const std::string& str)
     {
         char buffer[str.size() + 64];
-        memset(&buffer, 0, sizeof(buffer));
+        memset(buffer, 0, sizeof(buffer));
         int got = socket->receiveBytes(buffer, str.size());
         if (got != (int)str.size() ||
             strncmp(buffer, str.c_str(), got))


More information about the Libreoffice-commits mailing list