diff options
| author | Juanma Barranquero | 2015-10-24 03:22:50 +0200 |
|---|---|---|
| committer | Juanma Barranquero | 2015-10-25 00:32:21 +0200 |
| commit | 8a48f16de01eaa9f2c65baf43ab3168f68e0ad39 (patch) | |
| tree | be350205f004266aecf2ab24084594b0eda5b3cc | |
| parent | 478d9d9db39af654abdfeb793f2d9c2ecb71daf1 (diff) | |
| download | emacs-8a48f16de01eaa9f2c65baf43ab3168f68e0ad39.tar.gz emacs-8a48f16de01eaa9f2c65baf43ab3168f68e0ad39.zip | |
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.
| -rw-r--r-- | nt/addpm.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/nt/addpm.c b/nt/addpm.c index cd91a3e2d80..b2f09160983 100644 --- a/nt/addpm.c +++ b/nt/addpm.c | |||
| @@ -138,7 +138,7 @@ add_registry (const char *path) | |||
| 138 | /* Look for a GTK installation. If found, add it to the library search | 138 | /* Look for a GTK installation. If found, add it to the library search |
| 139 | path for Emacs so that the image libraries it provides are available | 139 | path for Emacs so that the image libraries it provides are available |
| 140 | to Emacs regardless of whether it is in the path or not. */ | 140 | to Emacs regardless of whether it is in the path or not. */ |
| 141 | if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, REG_GTK, REG_OPTION_NON_VOLATILE, | 141 | if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, REG_GTK, 0, |
| 142 | KEY_READ, >k_key) == ERROR_SUCCESS) | 142 | KEY_READ, >k_key) == ERROR_SUCCESS) |
| 143 | { | 143 | { |
| 144 | if (RegQueryValueEx (gtk_key, "DllPath", NULL, NULL, | 144 | if (RegQueryValueEx (gtk_key, "DllPath", NULL, NULL, |
| @@ -186,11 +186,9 @@ add_registry (const char *path) | |||
| 186 | /* Check both the current user and the local machine to see if we | 186 | /* Check both the current user and the local machine to see if we |
| 187 | have any resources. */ | 187 | have any resources. */ |
| 188 | 188 | ||
| 189 | if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, REG_ROOT, | 189 | if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, REG_ROOT, 0, |
| 190 | REG_OPTION_NON_VOLATILE, | ||
| 191 | KEY_WRITE, &hrootkey) != ERROR_SUCCESS | 190 | KEY_WRITE, &hrootkey) != ERROR_SUCCESS |
| 192 | && RegOpenKeyEx (HKEY_CURRENT_USER, REG_ROOT, | 191 | && RegOpenKeyEx (HKEY_CURRENT_USER, REG_ROOT, 0, |
| 193 | REG_OPTION_NON_VOLATILE, | ||
| 194 | KEY_WRITE, &hrootkey) != ERROR_SUCCESS) | 192 | KEY_WRITE, &hrootkey) != ERROR_SUCCESS) |
| 195 | { | 193 | { |
| 196 | return FALSE; | 194 | return FALSE; |