[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 8a48f16 1/5: addpm.c: Don't pass REG_OPTION_NON_VOL
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] master 8a48f16 1/5: addpm.c: Don't pass REG_OPTION_NON_VOLATILE to RegOpenKeyEx |
Date: |
Sat, 24 Oct 2015 23:16:24 +0000 |
branch: master
commit 8a48f16de01eaa9f2c65baf43ab3168f68e0ad39
Author: Juanma Barranquero <address@hidden>
Commit: Juanma Barranquero <address@hidden>
addpm.c: Don't pass REG_OPTION_NON_VOLATILE to RegOpenKeyEx
* 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 | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/nt/addpm.c b/nt/addpm.c
index cd91a3e..b2f0916 100644
--- a/nt/addpm.c
+++ b/nt/addpm.c
@@ -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, >k_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;
- [Emacs-diffs] master updated (478d9d9 -> b6c6629), Juanma Barranquero, 2015/10/24
- [Emacs-diffs] master 8a48f16 1/5: addpm.c: Don't pass REG_OPTION_NON_VOLATILE to RegOpenKeyEx,
Juanma Barranquero <=
- [Emacs-diffs] master 8c5747e 2/5: * nt/addpm.c (add_registry): Do not compute unused return value., Juanma Barranquero, 2015/10/24
- [Emacs-diffs] master b6c6629 5/5: addpm.c: Silence some warnings., Juanma Barranquero, 2015/10/24
- [Emacs-diffs] master cbbea70 3/5: addpm.c: Replace existing entries, but do not create new ones, Juanma Barranquero, 2015/10/24
- [Emacs-diffs] master 87a3064 4/5: addpm.c: Do not add obsolete GTK libraries to the path., Juanma Barranquero, 2015/10/24