]> code.delx.au - gnu-emacs/blobdiff - nt/addpm.c
* nt/addpm.c (add_registry): Do not compute unused return value.
[gnu-emacs] / nt / addpm.c
index cd91a3e2d80be452917f7076f97ccd7148f391fa..ba0eb36b08059bba0981b030a161a18e1b26f2c2 100644 (file)
@@ -104,12 +104,11 @@ env_vars[] =
 #endif
 };
 
-BOOL
+void
 add_registry (const char *path)
 {
   HKEY hrootkey = NULL;
   int i;
-  BOOL ok = TRUE;
   DWORD size;
 
   /* Record the location of Emacs to the App Paths key if we have
@@ -138,7 +137,7 @@ add_registry (const char *path)
       /* Look for a GTK installation. If found, add it to the library search
          path for Emacs so that the image libraries it provides are available
          to Emacs regardless of whether it is in the path or not.  */
-      if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, REG_GTK, REG_OPTION_NON_VOLATILE,
+      if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, REG_GTK, 0,
                         KEY_READ, &gtk_key) == ERROR_SUCCESS)
         {
           if (RegQueryValueEx (gtk_key, "DllPath", NULL, NULL,
@@ -186,29 +185,21 @@ add_registry (const char *path)
   /* Check both the current user and the local machine to see if we
      have any resources.  */
 
-  if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, REG_ROOT,
-                     REG_OPTION_NON_VOLATILE,
+  if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, REG_ROOT, 0,
                      KEY_WRITE, &hrootkey) != ERROR_SUCCESS
-      && RegOpenKeyEx (HKEY_CURRENT_USER, REG_ROOT,
-                        REG_OPTION_NON_VOLATILE,
+      && RegOpenKeyEx (HKEY_CURRENT_USER, REG_ROOT, 0,
                         KEY_WRITE, &hrootkey) != ERROR_SUCCESS)
-    {
-      return FALSE;
-    }
+    return;
 
   for (i = 0; i < (sizeof (env_vars) / sizeof (env_vars[0])); i++)
     {
       const char * value = env_vars[i].value ? env_vars[i].value : path;
 
-      if (RegSetValueEx (hrootkey, env_vars[i].name,
-                        0, REG_EXPAND_SZ,
-                        value, lstrlen (value) + 1) != ERROR_SUCCESS)
-       ok = FALSE;
+      RegSetValueEx (hrootkey, env_vars[i].name, 0, REG_EXPAND_SZ,
+                    value, lstrlen (value) + 1);
     }
 
   RegCloseKey (hrootkey);
-
-  return (ok);
 }
 
 int