1303 files changed, 32187 insertions, 57138 deletions
diff --git a/networking/nbd-client.c b/networking/nbd-client.c index cadda52..70869d6 100644 --- a/networking/nbd-client.c +++ b/networking/nbd-client.c @@ -57,9 +57,8 @@ int nbdclient_main(int argc, char **argv) uint32_t flags; char data[124]; } nbd_header; - struct bug_check { - char c[offsetof(struct nbd_header_t, data) == 8+8+8+4 ? 1 : -1]; - }; + + BUILD_BUG_ON(offsetof(struct nbd_header_t, data) != 8+8+8+4); // Parse command line stuff (just a stub now) if (argc != 4) @@ -83,7 +82,7 @@ int nbdclient_main(int argc, char **argv) // Find and connect to server sock = create_and_connect_stream_or_die(host, xatou16(port)); - setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &const_int_1, sizeof(const_int_1)); + setsockopt_1(sock, IPPROTO_TCP, TCP_NODELAY); // Log on to the server xread(sock, &nbd_header, 8+8+8+4 + 124); |