]> code.delx.au - gnu-emacs/commitdiff
* nt/addpm.c (add_registry): Do not compute unused return value.
authorJuanma Barranquero <lekktu@gmail.com>
Sat, 24 Oct 2015 02:01:22 +0000 (04:01 +0200)
committerJuanma Barranquero <lekktu@gmail.com>
Sat, 24 Oct 2015 22:33:00 +0000 (00:33 +0200)
nt/addpm.c

index b2f091609832240ed07cae69ea1206c581d5968c..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
@@ -190,23 +189,17 @@ add_registry (const char *path)
                      KEY_WRITE, &hrootkey) != ERROR_SUCCESS
       && 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