Signed-off-by: Yanis Kurganov <YKurganov@ptsecurity.com>

---
 src/dh.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/dh.c b/src/dh.c
index 3e07961..af34d3a 100644
--- a/src/dh.c
+++ b/src/dh.c
@@ -110,6 +110,8 @@ static unsigned char p_group14_value[] = {
 
 #define P_GROUP14_LEN 256 /* Size in bytes of the p number for group 14 */
 
+#define G_VALUE 2 /* G is defined as 2 by the ssh2 standards */
+
 #define PREFERRED_GROUP_BITS 1048576 /* preferred size in bits of the group the server will send */
 
 static int ssh_crypto_initialized;
@@ -532,24 +534,19 @@ static int ssh_client_dh_init(ssh_session session){
 }
 
 int ssh_client_dh_group_init(ssh_session session){
-  const unsigned int g_value = 2; /* G is defined as 2 by the ssh2 standards */
-
   if(dh_import_p_value(session,
      session->next_crypto->kex_type == SSH_KEX_DH_GROUP1_SHA1 ? p_group1_value : p_group14_value,
      session->next_crypto->kex_type == SSH_KEX_DH_GROUP1_SHA1 ? P_GROUP1_LEN : P_GROUP14_LEN) < 0) {
     ssh_set_error(session, SSH_FATAL, "Cannot import p number");
     return SSH_ERROR;
   }
-
-  if(dh_import_g_value(session, g_value) < 0) {
+  if(dh_import_g_value(session, G_VALUE) < 0) {
     ssh_set_error(session, SSH_FATAL, "Cannot import g number");
     return SSH_ERROR;
   }
-
   if(buffer_add_u8(session->out_buffer, SSH2_MSG_KEXDH_INIT) < 0) {
     return SSH_ERROR;
   }
-
   return ssh_client_dh_init(session);
 }
 
-- 
1.8.1.msysgit.1

