1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:07:43 +00:00

AK: Add implicit String -> StringView conversion

And tidy up existing view() users.
This commit is contained in:
Robin Burchell 2019-06-02 12:19:21 +02:00 committed by Andreas Kling
parent decf1afbaa
commit b55b6cd7fc
6 changed files with 13 additions and 6 deletions

View file

@ -101,7 +101,7 @@ int main(int argc, char**argv)
auto hostname = String(client_buffer, nrecv, Chomp);
dbgprintf("LookupServer: Got request for '%s' (using IP %s)\n",
hostname.characters(),
DNS_IP.view().characters());
DNS_IP.characters());
Vector<IPv4Address> addresses;
@ -194,7 +194,7 @@ Vector<IPv4Address> lookup(const String& hostname, bool& did_timeout, const Stri
dst_addr.sin_family = AF_INET;
dst_addr.sin_port = htons(53);
rc = inet_pton(AF_INET, DNS_IP.view().characters(), &dst_addr.sin_addr);
rc = inet_pton(AF_INET, DNS_IP.characters(), &dst_addr.sin_addr);
int nsent = sendto(fd, buffer.pointer(), buffer.size(), 0,(const struct sockaddr *)&dst_addr, sizeof(dst_addr));
if (nsent < 0) {