summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2015-04-30 13:47:16 -0700
committerGary E. Miller <gem@rellim.com>2015-04-30 13:47:16 -0700
commit7f67ff565a0e2e115f703964cd563229f9f828b3 (patch)
tree65eb385c1956cf7d0557a58477fd8e84bcc8ea6c
parent77e283cc8fda4ced8527a2cfc6fd4c863d9b86a4 (diff)
downloadgpsd-7f67ff565a0e2e115f703964cd563229f9f828b3.tar.gz
Still more whitespace fixups
-rw-r--r--json.c4
-rw-r--r--libgps_core.c4
-rw-r--r--libgpsd_core.c32
3 files changed, 20 insertions, 20 deletions
diff --git a/json.c b/json.c
index 979709ad..182a018b 100644
--- a/json.c
+++ b/json.c
@@ -54,7 +54,7 @@ everything will work. Strings are supported but all string storage
has to be inline in the struct.
NOTE
- This code has been spun out, packaged, and documented as a
+ This code has been spun out, packaged, and documented as a
reusable module; search for "microjson".
PERMISSIONS
@@ -659,7 +659,7 @@ int json_read_array(const char *cp, const struct json_array_t *arr,
if (*cp != '"')
return JSON_ERR_BADSTRING;
else
- ++cp;
+ ++cp;
break;
#endif /* JSON_MINIMAL */
case t_real:
diff --git a/libgps_core.c b/libgps_core.c
index b26e6ff1..434ebcf1 100644
--- a/libgps_core.c
+++ b/libgps_core.c
@@ -228,8 +228,8 @@ bool gps_waiting(const struct gps_data_t *gpsdata CONDITIONALLY_UNUSED, int time
return waiting;
}
-int gps_mainloop(struct gps_data_t *gpsdata CONDITIONALLY_UNUSED,
- int timeout CONDITIONALLY_UNUSED,
+int gps_mainloop(struct gps_data_t *gpsdata CONDITIONALLY_UNUSED,
+ int timeout CONDITIONALLY_UNUSED,
void (*hook)(struct gps_data_t *gpsdata) CONDITIONALLY_UNUSED)
{
int status = -1;
diff --git a/libgpsd_core.c b/libgpsd_core.c
index c6ced73d..c6ec4a22 100644
--- a/libgpsd_core.c
+++ b/libgpsd_core.c
@@ -67,7 +67,7 @@ void gpsd_acquire_reporting_lock(void)
thread holding the lock has died. Best for gppsd to just die
because things are FUBAR. */
- (void) fprintf(stderr,"pthread_mutex_lock() failed: %s\n",
+ (void) fprintf(stderr,"pthread_mutex_lock() failed: %s\n",
strerror(errno));
exit(EXIT_FAILURE);
}
@@ -83,7 +83,7 @@ void gpsd_release_reporting_lock(void)
this thread. This should never happen, so best for gpsd to die
because things are FUBAR. */
- (void) fprintf(stderr,"pthread_mutex_unlock() failed: %s\n",
+ (void) fprintf(stderr,"pthread_mutex_unlock() failed: %s\n",
strerror(errno));
exit(EXIT_FAILURE);
}
@@ -108,7 +108,7 @@ static void visibilize(char *outbuf, size_t outlen,
#endif /* !SQUELCH_ENABLE */
-void gpsd_vlog(const struct gpsd_errout_t *errout,
+void gpsd_vlog(const struct gpsd_errout_t *errout,
const int errlevel,
char *outbuf, size_t outlen,
const char *fmt, va_list ap)
@@ -182,7 +182,7 @@ void gpsd_vlog(const struct gpsd_errout_t *errout,
#endif /* !SQUELCH_ENABLE */
}
-void gpsd_log(const struct gpsd_errout_t *errout,
+void gpsd_log(const struct gpsd_errout_t *errout,
const int errlevel,
const char *fmt, ...)
/* assemble msg in printf(3) style, use errout hook or syslog for delivery */
@@ -200,7 +200,7 @@ const char *gpsd_prettydump(struct gps_device_t *session)
/* dump the current packet in a form optimised for eyeballs */
{
return gpsd_packetdump(session->msgbuf, sizeof(session->msgbuf),
- (char *)session->lexer.outbuffer,
+ (char *)session->lexer.outbuffer,
session->lexer.outbuflen);
}
@@ -279,7 +279,7 @@ int gpsd_switch_driver(struct gps_device_t *session, char *type_name)
return 0;
}
-void gps_context_init(struct gps_context_t *context,
+void gps_context_init(struct gps_context_t *context,
const char *label)
{
(void)memset(context, '\0', sizeof(struct gps_context_t));
@@ -356,7 +356,7 @@ void gpsd_deactivate(struct gps_device_t *session)
#endif /* of defined(NMEA2000_ENABLE) */
(void)gpsd_close(session);
if (session->mode == O_OPTIMIZE)
- gpsd_run_device_hook(&session->context->errout,
+ gpsd_run_device_hook(&session->context->errout,
session->gpsdata.dev.path,
"DEACTIVATE");
#ifdef PPS_ENABLE
@@ -469,7 +469,7 @@ int gpsd_open(struct gps_device_t *session)
netlib_errstr(dsock));
return -1;
} else
- gpsd_log(&session->context->errout, LOG_SPIN,
+ gpsd_log(&session->context->errout, LOG_SPIN,
"TCP device opened on fd %d\n", dsock);
session->gpsdata.gps_fd = dsock;
session->sourcetype = source_tcp;
@@ -562,7 +562,7 @@ int gpsd_activate(struct gps_device_t *session, const int mode)
#ifdef NON_NMEA_ENABLE
/* if it's a sensor, it must be probed */
- if ((session->servicetype == service_sensor) &&
+ if ((session->servicetype == service_sensor) &&
(session->sourcetype != source_can)) {
const struct gps_type_t **dp;
@@ -700,7 +700,7 @@ driver.
static gps_mask_t fill_dop(const struct gpsd_errout_t *errout,
- const struct gps_data_t * gpsdata,
+ const struct gps_data_t * gpsdata,
struct dop_t * dop)
{
double prod[4][4];
@@ -992,7 +992,7 @@ static void gpsd_error_model(struct gps_device_t *session,
int gpsd_await_data(fd_set *rfds,
fd_set *efds,
const int maxfd,
- fd_set *all_fds,
+ fd_set *all_fds,
struct gpsd_errout_t *errout)
/* await data from any socket in the all_fds set */
{
@@ -1083,7 +1083,7 @@ static bool hunt_failure(struct gps_device_t *session)
* enough). Removing this conjunct resurrected the failure
* of test/daemon/tcp-torture.log.
*
- * Our third attempt, isatty(session->gpsdata.gps_fd) != 0
+ * Our third attempt, isatty(session->gpsdata.gps_fd) != 0
* && session->badcount++>1, reverts to the old test that worked
* well on ttys for ttys and prevents non-tty devices from *ever*
* having hunt failures. This has the cost that non-tty devices
@@ -1229,7 +1229,7 @@ gps_mask_t gpsd_poll(struct gps_device_t *session)
* Are we seeing a new packet type? Then we probably
* want to change drivers.
*/
- bool new_packet_type =
+ bool new_packet_type =
(newtype != session->device_type->packet_type);
/*
* Possibly the old driver has a mode-switcher method, in
@@ -1290,7 +1290,7 @@ gps_mask_t gpsd_poll(struct gps_device_t *session)
session->gpsdata.dev.path);
/* track the packet count since achieving sync on the device */
- if (driver_change
+ if (driver_change
&& (session->drivers_identified & (1 << session->driver_index)) == 0) {
speed_t speed = gpsd_get_speed(session);
@@ -1390,7 +1390,7 @@ gps_mask_t gpsd_poll(struct gps_device_t *session)
if ((received & SATELLITE_SET) != 0
&& session->gpsdata.satellites_visible > 0) {
session->gpsdata.set |= fill_dop(&session->context->errout,
- &session->gpsdata,
+ &session->gpsdata,
&session->gpsdata.dop);
session->gpsdata.epe = NAN;
}
@@ -1460,7 +1460,7 @@ int gpsd_multipoll(const bool data_ready,
{
int fragments;
- gpsd_log(&device->context->errout, LOG_RAW + 1,
+ gpsd_log(&device->context->errout, LOG_RAW + 1,
"polling %d\n", device->gpsdata.gps_fd);
#ifdef NETFEED_ENABLE