diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2011-04-23 17:15:46 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2011-04-23 17:15:46 +0400 |
commit | cca89be9ade65eacde6be3da6f93c06b3ed585b6 (patch) | |
tree | 2369b16cecf252c8eb39ce535fdb811ebd301ca2 /winsup/cygwin/shared.cc | |
parent | 8ba4144d501d622c5612417ef3c6929d47aa2f87 (diff) |
* 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.
Diffstat (limited to 'winsup/cygwin/shared.cc')
-rw-r--r-- | winsup/cygwin/shared.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/winsup/cygwin/shared.cc b/winsup/cygwin/shared.cc index 0b19b188d..53ef7438e 100644 --- a/winsup/cygwin/shared.cc +++ b/winsup/cygwin/shared.cc @@ -111,8 +111,8 @@ init_installation_root () { reg_key r (i, KEY_WRITE, _WIDE (CYGWIN_INFO_INSTALLATIONS_NAME), NULL); - if (r.set_string (installation_key_buf, installation_root) - == ERROR_SUCCESS) + if (NT_SUCCESS (r.set_string (installation_key_buf, + installation_root))) break; } @@ -450,7 +450,7 @@ shared_info::heap_slop_size () { reg_key reg (i, KEY_READ, NULL); - if ((heap_slop = reg.get_int (L"heap_slop_in_mb", 0))) + if ((heap_slop = reg.get_dword (L"heap_slop_in_mb", 0))) break; heap_slop = wincap.heapslop (); } @@ -476,7 +476,7 @@ shared_info::heap_chunk_size () /* FIXME: We should not be restricted to a fixed size heap no matter what the fixed size is. */ - if ((heap_chunk = reg.get_int (L"heap_chunk_in_mb", 0))) + if ((heap_chunk = reg.get_dword (L"heap_chunk_in_mb", 0))) break; heap_chunk = 384; /* Default */ } |