projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bloom: allow to pass in whether to set bits for strings
[fio.git]
/
verify-state.h
diff --git
a/verify-state.h
b/verify-state.h
index ccde031adc6b0cb850420663db88fb34331a1af4..e46265e48d7a6c4ddbbac34a458e26d3272d60da 100644
(file)
--- a/
verify-state.h
+++ b/
verify-state.h
@@
-3,6
+3,7
@@
#include <stdint.h>
#include <string.h>
#include <stdint.h>
#include <string.h>
+#include <limits.h>
struct thread_rand32_state {
uint32_t s[4];
struct thread_rand32_state {
uint32_t s[4];
@@
-89,18
+90,19
@@
static inline void verify_state_gen_name(char *out, size_t size,
/*
* Escape '/', just turn them into '.'
*/
/*
* Escape '/', just turn them into '.'
*/
- strcpy(ename, name);
ptr = ename;
ptr = ename;
- while ((ptr = strchr(ptr, '/')) != NULL) {
- *ptr = '.';
- ptr++;
+ do {
+ *ptr = *name;
if (*ptr == '\0')
break;
if (*ptr == '\0')
break;
- }
+ else if (*ptr == '/')
+ *ptr = '.';
+ ptr++;
+ name++;
+ } while (1);
snprintf(out, size, "%s-%s-%d-verify.state", prefix, ename, num);
out[size - 1] = '\0';
snprintf(out, size, "%s-%s-%d-verify.state", prefix, ename, num);
out[size - 1] = '\0';
-
}
#endif
}
#endif