1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-02 09:47:23 +03:00

ctdb-tools: Drop global variable prog

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2017-06-30 17:12:48 +10:00 committed by Martin Schwenke
parent 6ac5cb4eaf
commit 7a2db5410f

View File

@ -48,7 +48,6 @@ struct ctdb_kill_tcp {
unsigned int batch_size;
};
static const char *prog;
/*
called when we get a read event on the raw socket
@ -270,7 +269,7 @@ static int ctdb_killtcp_destructor(struct ctdb_kill_tcp *killtcp)
return 0;
}
static void usage(void)
static void usage(const char *prog)
{
printf("usage: %s <interface> [ <srcip:port> <dstip:port> ]\n", prog);
exit(1);
@ -298,10 +297,8 @@ int main(int argc, char **argv)
}
}
prog = argv[0];
if (argc != 2 && argc != 4) {
usage();
usage(argv[0]);
}
if (argc == 4) {