emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 8c5747e 2/5: * nt/addpm.c (add_registry): Do not co


From: Juanma Barranquero
Subject: [Emacs-diffs] master 8c5747e 2/5: * nt/addpm.c (add_registry): Do not compute unused return value.
Date: Sat, 24 Oct 2015 23:16:25 +0000

branch: master
commit 8c5747ea98e82b3f2112abf0b62a509649101903
Author: Juanma Barranquero <address@hidden>
Commit: Juanma Barranquero <address@hidden>

    * nt/addpm.c (add_registry): Do not compute unused return value.
---
 nt/addpm.c |   15 ++++-----------
 1 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/nt/addpm.c b/nt/addpm.c
index b2f0916..ba0eb36 100644
--- a/nt/addpm.c
+++ b/nt/addpm.c
@@ -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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]