]> git.proxmox.com Git - mirror_edk2.git/blobdiff - StdLib/BsdSocketLib/res_comp.c
StdLib: Fix GCC warnings/errors caused by variables being set but not used.
[mirror_edk2.git] / StdLib / BsdSocketLib / res_comp.c
index cddda3e150f8b0be0f190c6e67be8694bc752329..7c327fac2e40985b0ab40cd3673f2a80fda34714 100644 (file)
@@ -1,3 +1,13 @@
+/** @file\r
+  Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials are licensed and made available\r
+  under the terms and conditions of the BSD License which accompanies this\r
+  distribution.  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php.\r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+**/\r
 /*\r
  * Copyright (c) 1985, 1993\r
  *    The Regents of the University of California.  All rights reserved.\r
@@ -168,7 +178,7 @@ res_hnok(
     const char *dn\r
     )\r
 {\r
-    int ppch = '\0', pch = PERIOD, ch = *dn++;\r
+    int pch = PERIOD, ch = *dn++;\r
 \r
     while (ch != '\0') {\r
         int nch = *dn++;\r
@@ -185,7 +195,8 @@ res_hnok(
             if (!middlechar(ch))\r
                 return (0);\r
         }\r
-        ppch = pch, pch = ch, ch = nch;\r
+        pch = ch;\r
+        ch = nch;\r
     }\r
     return (1);\r
 }\r