* registry.cc (reg_key::get_dword): Rename from get_int, use DWORD
rather than int type. Avoid compiler warning. (reg_key::set_dword): Rename from set_int, use DWORD rather than int type. Change return type to NTSTATUS. (reg_key::get_string): Change return type to NTSTATUS. (reg_key::set_string): Ditto. * registry.h: Accommodate above changes. * environ.cc (regopt): Test return value of reg_key::get_string as NTSTATUS. * sched.cc (sched_rr_get_interval): Change local int vars to DWORD. Call reg_key::get_dword instead of reg_key::get_int. * shared.cc (init_installation_root): Test return value of reg_key::get_string as NTSTATUS. (shared_info::heap_slop_size): Call reg_key::get_dword rather than reg_key::get_int. (shared_info::heap_chunk_size): Ditto. * shared_info.h (CURR_SHARED_MAGIC): Update. (class shared_info): Change heap_chunk and heap_slop to DWORD values.
This commit is contained in:
@ -712,7 +712,8 @@ regopt (const WCHAR *name, char *buf)
|
||||
{
|
||||
reg_key r (i, KEY_READ, _WIDE (CYGWIN_INFO_PROGRAM_OPTIONS_NAME), NULL);
|
||||
|
||||
if (r.get_string (lname.Buffer, (PWCHAR) buf, NT_MAX_PATH, L"") == ERROR_SUCCESS)
|
||||
if (NT_SUCCESS (r.get_string (lname.Buffer, (PWCHAR) buf,
|
||||
NT_MAX_PATH, L"")))
|
||||
{
|
||||
char *newp;
|
||||
sys_wcstombs_alloc(&newp, HEAP_NOTHEAP, (PWCHAR) buf);
|
||||
|
Reference in New Issue
Block a user