summaryrefslogtreecommitdiffstats
path: root/kiss/kissattach.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2013-06-05 00:57:38 +0200
committerRalf Baechle <ralf@linux-mips.org>2013-06-17 17:11:30 +0200
commit1245fbd2a8d60bab7b16b8a1d3c0122fee72f53f (patch)
tree6dcf938b1472a9b5cac35648ffb0f3d185c39590 /kiss/kissattach.c
parent0b4425760be1f92a1f25daeb5d3dc91814a98622 (diff)
Nuke trailing whitespace.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'kiss/kissattach.c')
-rw-r--r--kiss/kissattach.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/kiss/kissattach.c b/kiss/kissattach.c
index 6ed66a2..49f5ee2 100644
--- a/kiss/kissattach.c
+++ b/kiss/kissattach.c
@@ -67,16 +67,16 @@ static int readconfig(char *port)
FILE *fp;
char buffer[90], *s;
int n = 0;
-
+
if ((fp = fopen(CONF_AXPORTS_FILE, "r")) == NULL) {
- fprintf(stderr, "%s: cannot open axports file %s\n",
+ fprintf(stderr, "%s: cannot open axports file %s\n",
progname, CONF_AXPORTS_FILE);
return FALSE;
}
while (fgets(buffer, 90, fp) != NULL) {
n++;
-
+
if ((s = strchr(buffer, '\n')) != NULL)
*s = '\0';
@@ -87,10 +87,10 @@ static int readconfig(char *port)
fprintf(stderr, "%s: unable to parse line %d of the axports file\n", progname, n);
return FALSE;
}
-
+
if (strcmp(s, port) != 0)
continue;
-
+
if ((s = strtok(NULL, " \t\r\n")) == NULL) {
fprintf(stderr, "%s: unable to parse line %d of the axports file\n", progname, n);
return FALSE;
@@ -118,14 +118,14 @@ static int readconfig(char *port)
}
fclose(fp);
-
+
return TRUE;
}
-
+
fclose(fp);
fprintf(stderr, "%s: cannot find port %s in axports\n", progname, port);
-
+
return FALSE;
}
@@ -136,7 +136,7 @@ static int setifcall(int fd, char *name)
if (ax25_aton_entry(name, call) == -1)
return FALSE;
-
+
if (ioctl(fd, SIOCSIFHWADDR, call) != 0) {
close(fd);
fprintf(stderr, "%s: ", progname);
@@ -152,7 +152,7 @@ static int startiface(char *dev, struct hostent *hp)
{
struct ifreq ifr;
int fd;
-
+
if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
fprintf(stderr, "%s: ", progname);
perror("socket");
@@ -160,10 +160,10 @@ static int startiface(char *dev, struct hostent *hp)
}
strcpy(ifr.ifr_name, dev);
-
+
if (hp != NULL) {
ifr.ifr_addr.sa_family = AF_INET;
-
+
ifr.ifr_addr.sa_data[0] = 0;
ifr.ifr_addr.sa_data[1] = 0;
ifr.ifr_addr.sa_data[2] = hp->h_addr_list[0][0];
@@ -206,9 +206,9 @@ static int startiface(char *dev, struct hostent *hp)
perror("SIOCSIFFLAGS");
return FALSE;
}
-
+
close(fd);
-
+
return TRUE;
}
@@ -325,7 +325,7 @@ int main(int argc, char *argv[])
if (ioctl(fd, TIOCSETD, &disc) == -1) {
fprintf(stderr, "%s: Error setting line discipline: ", progname);
perror("TIOCSETD");
- fprintf(stderr, "Are you sure you have enabled %s support in the kernel\n",
+ fprintf(stderr, "Are you sure you have enabled %s support in the kernel\n",
disc == N_AX25 ? "MKISS" : "6PACK");
fprintf(stderr, "or, if you made it a module, that the module is loaded?\n");
return 1;
@@ -349,7 +349,7 @@ int main(int argc, char *argv[])
/* ax25 ifaces should not really need to have an IP address assigned to */
if (!startiface(dev, hp))
- return 1;
+ return 1;
printf("AX.25 port %s bound to device %s\n", portname, dev);
if (i_am_unix98_pty_master) {