Skip to content

Commit e734bab

Browse files
committed
NetworkTools: Improve string typedef usage
1 parent 5c9b9a2 commit e734bab

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

plugins/NetworkTools/whois.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ BOOLEAN ReadSocketString(
9797
data = (PSTR)PhAllocate(allocatedLength);
9898
dataLength = 0;
9999

100-
memset(buffer, 0, PAGE_SIZE);
101-
102100
while ((returnLength = recv(Handle, buffer, PAGE_SIZE, 0)) != SOCKET_ERROR)
103101
{
104102
if (returnLength == 0)
@@ -124,7 +122,7 @@ BOOLEAN ReadSocketString(
124122
data = (PSTR)PhReAllocate(data, allocatedLength);
125123
}
126124

127-
data[dataLength] = 0;
125+
data[dataLength] = ANSI_NULL;
128126

129127
if (dataLength)
130128
{

0 commit comments

Comments
 (0)