aboutsummaryrefslogtreecommitdiffstats
path: root/src/timestamp.c
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2008-09-24 23:26:50 -0400
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2008-09-24 23:26:50 -0400
commit1c6aeb0448af8712ad5ca8a695351d397bc1e0ce (patch)
treee5967cc40750ac33f1328c12e6cc070dc5176d8f /src/timestamp.c
parentc52d7ab471d62b32836617fce06c0946d08ecb09 (diff)
parent956ffd54dda4da2f6d7c0963fda54a6be95f1c4f (diff)
Merge branch 'master' of ssh://cvs/cvs/proj/litmus/repo/ft_tools
Diffstat (limited to 'src/timestamp.c')
-rw-r--r--src/timestamp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/timestamp.c b/src/timestamp.c
index 1df252a..f3f7861 100644
--- a/src/timestamp.c
+++ b/src/timestamp.c
@@ -1,3 +1,4 @@
1#include <stdio.h>
1#include <string.h> 2#include <string.h>
2 3
3#include "timestamp.h" 4#include "timestamp.h"
@@ -46,7 +47,8 @@ int str2event(const char* str, cmd_t *id)
46 *id = event_table[i].id; 47 *id = event_table[i].id;
47 return 1; 48 return 1;
48 } 49 }
49 return 0; 50 /* try to parse it as a number */
51 return sscanf(str, "%u", id);
50} 52}
51 53
52const char* event2str(cmd_t id) 54const char* event2str(cmd_t id)