Commit 8c5747ea authored by Juanma Barranquero's avatar Juanma Barranquero

* nt/addpm.c (add_registry): Do not compute unused return value.

parent 8a48f16d
...@@ -104,12 +104,11 @@ env_vars[] = ...@@ -104,12 +104,11 @@ env_vars[] =
#endif #endif
}; };
BOOL void
add_registry (const char *path) add_registry (const char *path)
{ {
HKEY hrootkey = NULL; HKEY hrootkey = NULL;
int i; int i;
BOOL ok = TRUE;
DWORD size; DWORD size;
/* Record the location of Emacs to the App Paths key if we have /* Record the location of Emacs to the App Paths key if we have
...@@ -190,23 +189,17 @@ add_registry (const char *path) ...@@ -190,23 +189,17 @@ add_registry (const char *path)
KEY_WRITE, &hrootkey) != ERROR_SUCCESS KEY_WRITE, &hrootkey) != ERROR_SUCCESS
&& RegOpenKeyEx (HKEY_CURRENT_USER, REG_ROOT, 0, && RegOpenKeyEx (HKEY_CURRENT_USER, REG_ROOT, 0,
KEY_WRITE, &hrootkey) != ERROR_SUCCESS) KEY_WRITE, &hrootkey) != ERROR_SUCCESS)
{ return;
return FALSE;
}
for (i = 0; i < (sizeof (env_vars) / sizeof (env_vars[0])); i++) for (i = 0; i < (sizeof (env_vars) / sizeof (env_vars[0])); i++)
{ {
const char * value = env_vars[i].value ? env_vars[i].value : path; const char * value = env_vars[i].value ? env_vars[i].value : path;
if (RegSetValueEx (hrootkey, env_vars[i].name, RegSetValueEx (hrootkey, env_vars[i].name, 0, REG_EXPAND_SZ,
0, REG_EXPAND_SZ, value, lstrlen (value) + 1);
value, lstrlen (value) + 1) != ERROR_SUCCESS)
ok = FALSE;
} }
RegCloseKey (hrootkey); RegCloseKey (hrootkey);
return (ok);
} }
int int
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment