projects
/
ccan
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dca5964
)
ccanlint: optimize the timeout case
author
Rusty Russell
<rusty@rustcorp.com.au>
Fri, 9 Apr 2010 04:42:53 +0000
(14:12 +0930)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Fri, 9 Apr 2010 04:42:53 +0000
(14:12 +0930)
This takes my "make fastcheck" from about 57 seconds to about 43 seconds.
tools/tools.c
patch
|
blob
|
history
diff --git
a/tools/tools.c
b/tools/tools.c
index 769d6aeee7b1535ad191c3c22167ccb616ed283c..5db43df08b20ed8b45139055ee42c58d463322cc 100644
(file)
--- a/
tools/tools.c
+++ b/
tools/tools.c
@@
-145,6
+145,8
@@
char *run_command(const void *ctx, unsigned int *time_ms, const char *fmt, ...)
if (!time_ms)
time_ms = &default_time;
+ else if (*time_ms == 0)
+ return talloc_strdup(ctx, "\n== TIMED OUT ==\n");
va_start(ap, fmt);
cmd = talloc_vasprintf(ctx, fmt, ap);