chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fsckd: the error code is actually returned in 'fd'
[elogind.git]
/
src
/
test
/
test-ring.c
diff --git
a/src/test/test-ring.c
b/src/test/test-ring.c
index 880815811cad056dc17e3044f51057a26504fb10..cb8a5d4e9e7fa6cebcd83f4b7738f5237395ab23 100644
(file)
--- a/
src/test/test-ring.c
+++ b/
src/test/test-ring.c
@@
-20,23
+20,18
@@
***/
#include <string.h>
***/
#include <string.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <locale.h>
-#include <errno.h>
#include "def.h"
#include "ring.h"
#include "def.h"
#include "ring.h"
-#include "util.h"
static void test_ring(void) {
static const char buf[8192];
static void test_ring(void) {
static const char buf[8192];
-
struct r
ing r;
+
R
ing r;
size_t l;
struct iovec vec[2];
int s;
size_t l;
struct iovec vec[2];
int s;
-
memset(&r, 0, sizeof(r)
);
+
zero(r
);
l = ring_peek(&r, vec);
assert_se(l == 0);
l = ring_peek(&r, vec);
assert_se(l == 0);