summaryrefslogtreecommitdiff
path: root/mcastseed/src/mcastseed.c
diff options
context:
space:
mode:
Diffstat (limited to 'mcastseed/src/mcastseed.c')
-rw-r--r--mcastseed/src/mcastseed.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/mcastseed/src/mcastseed.c b/mcastseed/src/mcastseed.c
index 3e8b50c..48f8869 100644
--- a/mcastseed/src/mcastseed.c
+++ b/mcastseed/src/mcastseed.c
@@ -29,7 +29,7 @@
/* Cmdline Arguments */
char *prog_name = NULL;
-char *mcast_ip = NULL;
+char *mcast_ip = NULL;
char *port = NULL;
int mcast_ttl = 0;
@@ -285,10 +285,9 @@ int send_data() {
int paylen = MULTICAST_MAX_PAYLOAD_SIZE;
int i;
-
/* XXX Dummy */
memset(buf, '.', MULTICAST_MAX_PAYLOAD_SIZE-1);
- buf[MULTICAST_MAX_PAYLOAD_SIZE-1]='\n';
+ buf[MULTICAST_MAX_PAYLOAD_SIZE-1]='\n';
strcpy(buf, "dataXXXXJe suis a la plage (XXXXX)");
send_fake(buf, paylen, 5);
@@ -317,7 +316,7 @@ int send_data() {
fprintf(stderr, "%s", "Short packet sent");
}
- return 1;
+ return 1;
}
@@ -420,7 +419,7 @@ void usage(char *msg) {
void arg_parse(int argc, char* argv[]) {
prog_name = argv[0];
if ( argc > 3 )
- usage("Too many arguments");
+ usage("Too many arguments");
port = (argc >= 2)?argv[1]:DEFAULT_PORT_STR;
mcast_ip = (argc >= 3)?argv[2]:DEFAULT_MCAST_IP_STR;
mcast_ttl = (argc >= 4)?atoi(argv[3]):DEFAULT_MCAST_TTL;
@@ -433,7 +432,7 @@ void fsm_trace(int state) {
if ( state < 0 ) {
fprintf(stderr, "Abnormal exit condition %i (from %s)\n", state, state_str[prev_state]);
- } else if ( prev_state != state) {
+ } else if ( prev_state != state) {
if ( state == 0 ) {
fprintf(stderr, "Normal exit (from %s)\n", state_str[prev_state]);
} else {