Skip to content

Commit

Permalink
Fixed some bugs which crept in
Browse files Browse the repository at this point in the history
  • Loading branch information
dtynan committed Jun 29, 2022
1 parent 291a37d commit 0f17a14
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gps_time.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ void usage();
int
main(int argc, char *argv[])
{
int i, fd, speed = 9600;
char *cp, *device = "/dev/ttyu0";
int i, fd, baud = 9600;
char *device = "/dev/ttyu0";
struct termios tios;
FILE *iofp;

Expand All @@ -104,7 +104,7 @@ main(int argc, char *argv[])
while ((i = getopt(argc, argv, "s:l:v")) != EOF) {
switch (i) {
case 's':
speed = atoi(optarg);
baud = atoi(optarg);
break;

case 'l':
Expand All @@ -121,7 +121,7 @@ main(int argc, char *argv[])
}
}
if (verbose)
printf("GPS device: %s, speed: %d.\n", device, speed);
printf("GPS device: %s, speed: %d.\n", device, baud);
if ((fd = open(device, O_RDWR|O_NOCTTY|O_NDELAY)) < 0) {
fprintf(stderr, "gps_time: ");
perror(device);
Expand Down

0 comments on commit 0f17a14

Please sign in to comment.