From: Shawn Routhier Date: Tue, 22 Sep 2015 15:54:30 +0000 (-0700) Subject: [trac4001] Move the clearing of errno per review comments X-Git-Tag: trac4045_base~4^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ef36ce1008660a44182aeaad83a9f5f2d4c6cc18;p=thirdparty%2Fkea.git [trac4001] Move the clearing of errno per review comments --- diff --git a/src/hooks/dhcp/user_chk/load_unload.cc b/src/hooks/dhcp/user_chk/load_unload.cc index 20ed539ce0..c29a4f986b 100644 --- a/src/hooks/dhcp/user_chk/load_unload.cc +++ b/src/hooks/dhcp/user_chk/load_unload.cc @@ -75,9 +75,6 @@ int load(LibraryHandle&) { // non-zero indicates an error. int ret_val = 0; - // zero out the errno to be safe - errno = 0; - try { // Instantiate the registry. user_registry.reset(new UserRegistry()); @@ -91,6 +88,9 @@ int load(LibraryHandle&) { // Do an initial load of the registry. user_registry->refresh(); + // zero out the errno to be safe + errno = 0; + // Open up the output file for user_chk results. user_chk_output.open(user_chk_output_fname, std::fstream::out | std::fstream::app);