]> code.delx.au - gnu-emacs/commitdiff
addpm.c: Don't pass REG_OPTION_NON_VOLATILE to RegOpenKeyEx
authorJuanma Barranquero <lekktu@gmail.com>
Sat, 24 Oct 2015 01:22:50 +0000 (03:22 +0200)
committerJuanma Barranquero <lekktu@gmail.com>
Sat, 24 Oct 2015 22:32:21 +0000 (00:32 +0200)
* nt/addpm.c (add_registry): Pass 0 to ulOptions argument of
RegOpenKeyEx, not REG_OPTION_NON_VOLATILE.  This doesn't change
current behavior because REG_OPTION_NON_VOLATILE is defined to
be 0L anyway, but that option is actually documented only for
RegCreateKeyEx.

nt/addpm.c

index cd91a3e2d80be452917f7076f97ccd7148f391fa..b2f091609832240ed07cae69ea1206c581d5968c 100644 (file)
@@ -138,7 +138,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,11 +186,9 @@ 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;