@@ -109,7 +109,7 @@ static const char *read_value_str_from_path(HKEY path_handle, const char *const
109109{
110110 DWORD value_len = 0U ;
111111 /* Start by trying to discover how long the string held by the key is */
112- const LSTATUS result = RegGetValue (path_handle , NULL , value_name , RRF_RT_REG_SZ , NULL , NULL , & value_len );
112+ LSTATUS result = RegGetValue (path_handle , NULL , value_name , RRF_RT_REG_SZ , NULL , NULL , & value_len );
113113 /* If that didn't work, we have no hoope, so bail */
114114 if (result != ERROR_SUCCESS && result != ERROR_MORE_DATA ) {
115115 display_error (result , "retrieving registry value" , value_name );
@@ -126,7 +126,8 @@ static const char *read_value_str_from_path(HKEY path_handle, const char *const
126126 }
127127
128128 /* Finally, try reading the value and return it to the user if this didn't explode */
129- assert (RegGetValue (path_handle , NULL , value_name , RRF_RT_REG_SZ , NULL , value , & value_len ) == ERROR_SUCCESS );
129+ result = RegGetValue (path_handle , NULL , value_name , RRF_RT_REG_SZ , NULL , value , & value_len );
130+ assert (result == ERROR_SUCCESS );
130131 return value ;
131132}
132133
0 commit comments