]> git.proxmox.com Git - mirror_edk2.git/blobdiff - AppPkg/Applications/Sockets/GetHostByAddr/GetHostByAddr.c
Merged socket development branch:
[mirror_edk2.git] / AppPkg / Applications / Sockets / GetHostByAddr / GetHostByAddr.c
index 2e626396caa3fb4c786762bea916958cfbc6a413..cec6b6c7c9af2e0b573c2de94191ad192ef64d1a 100644 (file)
@@ -59,10 +59,10 @@ main (
                        &RemoteAddress[1],\r
                        &RemoteAddress[2],\r
                        &RemoteAddress[3]))\r
-    || ( 255 < RemoteAddress [0])\r
-    || ( 255 < RemoteAddress [1])\r
-    || ( 255 < RemoteAddress [2])\r
-    || ( 255 < RemoteAddress [3])) {\r
+    || ( 255 < RemoteAddress[0])\r
+    || ( 255 < RemoteAddress[1])\r
+    || ( 255 < RemoteAddress[2])\r
+    || ( 255 < RemoteAddress[3])) {\r
     Print ( L"%a  <IPv4 Address>\r\n", Argv[0]);\r
   }\r
   else {\r
@@ -75,10 +75,10 @@ main (
     IpAddress[3] = (UINT8)RemoteAddress[3];\r
     pHost = gethostbyaddr ( &IpAddress[0], INADDRSZ, AF_INET );\r
     if ( NULL == pHost ) {\r
-      Print ( L"ERROR - host not found, errno: %d\r\n", errno );\r
+      Print ( L"ERROR - host not found, h_errno: %d\r\n", h_errno );\r
     }\r
     else {\r
-      pIpAddress = (UINT8 *)pHost->h_addr_list [ 0 ];\r
+      pIpAddress = (UINT8 *)pHost->h_addr_list[ 0 ];\r
       Print ( L"%d.%d.%d.%d, %a\r\n",\r
               pIpAddress[0],\r
               pIpAddress[1],\r