Browse Source

ccan: Update to latest version (which includes floatval option support)

Luke Dashjr 11 years ago
parent
commit
202067456a
2 changed files with 1 additions and 29 deletions
  1. 1 1
      ccan-upstream
  2. 0 28
      miner.c

+ 1 - 1
ccan-upstream

@@ -1 +1 @@
-Subproject commit 7471ecd79174306ee976a4ecc09cc2b9ebb4b501
+Subproject commit 8b0bdb090e2882aa431e89f4bc7aa4736e9e2838

+ 0 - 28
miner.c

@@ -1104,34 +1104,6 @@ struct pool *current_pool(void)
 	return pool;
 }
 
-// Copied from ccan/opt/helpers.c
-static char *arg_bad(const char *fmt, const char *arg)
-{
-	char *str = malloc(strlen(fmt) + strlen(arg));
-	sprintf(str, fmt, arg);
-	return str;
-}
-
-static
-char *opt_set_floatval(const char *arg, float *f)
-{
-	char *endp;
-
-	errno = 0;
-	*f = strtof(arg, &endp);
-	if (*endp || !arg[0])
-		return arg_bad("'%s' is not a number", arg);
-	if (errno)
-		return arg_bad("'%s' is out of range", arg);
-	return NULL;
-}
-
-static
-void opt_show_floatval(char buf[OPT_SHOW_LEN], const float *f)
-{
-	snprintf(buf, OPT_SHOW_LEN, "%.1f", *f);
-}
-
 char *set_int_range(const char *arg, int *i, int min, int max)
 {
 	char *err = opt_set_intval(arg, i);