diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2008-09-24 23:26:50 -0400 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2008-09-24 23:26:50 -0400 |
commit | 1c6aeb0448af8712ad5ca8a695351d397bc1e0ce (patch) | |
tree | e5967cc40750ac33f1328c12e6cc070dc5176d8f /src/timestamp.c | |
parent | c52d7ab471d62b32836617fce06c0946d08ecb09 (diff) | |
parent | 956ffd54dda4da2f6d7c0963fda54a6be95f1c4f (diff) |
Merge branch 'master' of ssh://cvs/cvs/proj/litmus/repo/ft_tools
Diffstat (limited to 'src/timestamp.c')
-rw-r--r-- | src/timestamp.c | 4 |
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 | ||
52 | const char* event2str(cmd_t id) | 54 | const char* event2str(cmd_t id) |