Browse Source

[trac4001] Move the clearing of errno per review comments

Shawn Routhier 9 years ago
parent
commit
ef36ce1008
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/hooks/dhcp/user_chk/load_unload.cc

+ 3 - 3
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);