projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
t/io_uring: restore usage of IORING_SETUP_IOPOLL
[fio.git]
/
verify-state.h
diff --git
a/verify-state.h
b/verify-state.h
index ccde031adc6b0cb850420663db88fb34331a1af4..6da1585b24657a60d7357d4f04f6f445f01544f3 100644
(file)
--- a/
verify-state.h
+++ b/
verify-state.h
@@
-3,6
+3,8
@@
#include <stdint.h>
#include <string.h>
#include <stdint.h>
#include <string.h>
+#include <limits.h>
+#include "lib/nowarn_snprintf.h"
struct thread_rand32_state {
uint32_t s[4];
struct thread_rand32_state {
uint32_t s[4];
@@
-76,7
+78,7
@@
static inline size_t thread_io_list_sz(struct thread_io_list *s)
static inline struct thread_io_list *io_list_next(struct thread_io_list *s)
{
static inline struct thread_io_list *io_list_next(struct thread_io_list *s)
{
- return (
void *) s + thread_io_list_sz(s
);
+ return (
struct thread_io_list *)((char *) s + thread_io_list_sz(s)
);
}
static inline void verify_state_gen_name(char *out, size_t size,
}
static inline void verify_state_gen_name(char *out, size_t size,
@@
-89,18
+91,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);
+
nowarn_
snprintf(out, size, "%s-%s-%d-verify.state", prefix, ename, num);
out[size - 1] = '\0';
out[size - 1] = '\0';
-
}
#endif
}
#endif