diff cli-runopts.c @ 568:005530560594

Rearrange getaddrstring() etc
author Matt Johnston <matt@ucc.asn.au>
date Tue, 01 Sep 2009 16:38:26 +0000
parents c3f2ec71e3d4
children b6665c1eac43
line wrap: on
line diff
--- a/cli-runopts.c	Mon Aug 31 15:25:39 2009 +0000
+++ b/cli-runopts.c	Tue Sep 01 16:38:26 2009 +0000
@@ -378,15 +378,19 @@
 		}
 	}
 	if (keepalive_arg) {
-		if (m_str_to_uint(keepalive_arg, &opts.keepalive_secs) == DROPBEAR_FAILURE) {
+		unsigned int val;
+		if (m_str_to_uint(keepalive_arg, &val) == DROPBEAR_FAILURE) {
 			dropbear_exit("Bad keepalive '%s'", keepalive_arg);
 		}
+		opts.keepalive_secs = val;
 	}
 
 	if (idle_timeout_arg) {
-		if (m_str_to_uint(idle_timeout_arg, &opts.idle_timeout_secs) == DROPBEAR_FAILURE) {
+		unsigned int val;
+		if (m_str_to_uint(idle_timeout_arg, &val) == DROPBEAR_FAILURE) {
 			dropbear_exit("Bad idle_timeout '%s'", idle_timeout_arg);
 		}
+		opts.idle_timeout_secs = val;
 	}
 
 #ifdef ENABLE_CLI_NETCAT
@@ -454,7 +458,7 @@
 		sign_key * key = (sign_key*)iter->item;
 		const size_t size = len - total;
 		int written = snprintf(ret+total, size, "-i %s", key->filename);
-		dropbear_assert(written < size);
+		dropbear_assert((unsigned int)written < size);
 		total += written;
 	}