projects
/
nbd.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
154adb1
)
Make -Wall clean
author
Wouter Verhelst <w@uter.be>
Sun, 25 Jul 2010 00:00:23 +0000
(
02:00
+0200)
committer
Wouter Verhelst <w@uter.be>
Sun, 25 Jul 2010 00:00:23 +0000
(
02:00
+0200)
nbd-client.c
patch
|
blob
|
history
nbd-server.c
patch
|
blob
|
history
diff --git
a/nbd-client.c
b/nbd-client.c
index
1fbd4c4
..
0e1da2b
100644
(file)
--- a/
nbd-client.c
+++ b/
nbd-client.c
@@
-271,7
+271,7
@@
int main(int argc, char *argv[]) {
int nofork=0;
u64 size64;
u32 flags;
int nofork=0;
u64 size64;
u32 flags;
- int i, c;
+ int c;
int nonspecial=0;
struct option long_options[] = {
{ "block-size", required_argument, NULL, 'b' },
int nonspecial=0;
struct option long_options[] = {
{ "block-size", required_argument, NULL, 'b' },
diff --git
a/nbd-server.c
b/nbd-server.c
index
16d70f7
..
70db6d1
100644
(file)
--- a/
nbd-server.c
+++ b/
nbd-server.c
@@
-911,7
+911,7
@@
off_t size_autodetect(int fhandle) {
#ifdef HAVE_SYS_IOCTL_H
#ifdef BLKGETSIZE64
DEBUG("looking for export size with ioctl BLKGETSIZE64\n");
#ifdef HAVE_SYS_IOCTL_H
#ifdef BLKGETSIZE64
DEBUG("looking for export size with ioctl BLKGETSIZE64\n");
- if (!ioctl(fhandle, BLKGETSIZE64, bytes) && bytes) {
+ if (!ioctl(fhandle, BLKGETSIZE64, &bytes) && bytes) {
return (off_t)bytes;
}
#endif /* BLKGETSIZE64 */
return (off_t)bytes;
}
#endif /* BLKGETSIZE64 */
@@
-1663,11
+1663,9
@@
int serveloop(GArray* servers) {
* @param serve the server we want to connect.
**/
void setup_serve(SERVER *serve) {
* @param serve the server we want to connect.
**/
void setup_serve(SERVER *serve) {
- struct sockaddr_storage addrin;
struct addrinfo hints;
struct addrinfo *ai = NULL;
struct sigaction sa;
struct addrinfo hints;
struct addrinfo *ai = NULL;
struct sigaction sa;
- int addrinlen = sizeof(addrin);
int sock_flags;
#ifndef sun
int yes=1;
int sock_flags;
#ifndef sun
int yes=1;