Browse Source

[2272] Added changes based on the code review.

Marcin Siodelski 12 years ago
parent
commit
3d13f1625f
2 changed files with 2 additions and 2 deletions
  1. 1 1
      configure.ac
  2. 1 1
      tests/tools/perfdhcp/tests/command_options_helper.h

+ 1 - 1
configure.ac

@@ -1085,7 +1085,7 @@ fi
 AC_MSG_CHECKING([whether optreset variable is defined in unistd.h])
 AC_TRY_LINK(
     [#include <unistd.h>],
-    [extern int optreset; optreset=1],
+    [extern int optreset; optreset=1;],
     [ AC_MSG_RESULT(yes)
       var_optreset_exists=yes],
     [ AC_MSG_RESULT(no)

+ 1 - 1
tests/tools/perfdhcp/tests/command_options_helper.h

@@ -115,7 +115,7 @@ private:
 
         if (tokens.size() > 0) {
             // Allocate array of C-strings where we will store tokens
-            results = new (std::nothrow) char*[tokens.size() * sizeof(char*)];
+            results = new (std::nothrow) char*[tokens.size()];
             assert(results != NULL);
             // Store tokens in C-strings array
             for (int i = 0; i < tokens.size(); ++i) {