diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-06-11 09:20:20 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-06-11 09:20:20 -0400 |
commit | 2941f808be395819aefb9241b3889b441b73ea1b (patch) | |
tree | 083353edd201273d3e3af9a604ff5eecca56a319 | |
parent | 087691569a1e6ae23c1969db5a1d0ebc5d229ca5 (diff) | |
download | gpsd-2941f808be395819aefb9241b3889b441b73ea1b.tar.gz |
Code slimming.
-rwxr-xr-x | devtools/sizes | 2 | ||||
-rw-r--r-- | gpsd.c | 2 | ||||
-rw-r--r-- | serial.c | 5 |
3 files changed, 4 insertions, 5 deletions
diff --git a/devtools/sizes b/devtools/sizes index 3adcb45a..0a27e690 100755 --- a/devtools/sizes +++ b/devtools/sizes @@ -68,7 +68,7 @@ sizeit("Minimalist build, stripped to NMEA only with shm interface", ] + nmea_variants+binary_gps+non_gps+time_service+debugging) sizeit("Normal build, configure options defaulted", "normal", []) os.system("size gpsd-*-build") -os.system("rm gpsd-*-build") +#os.system("rm gpsd-*-build") os.system("scons -c > /dev/null; rm -fr .scons*") #end @@ -952,6 +952,7 @@ static void set_serial(struct gps_device_t *device, } #endif /* RECONFIGURE_ENABLE */ +#ifdef SOCKET_EXPORT_ENABLE static void json_devicelist_dump(char *reply, size_t replylen) { struct gps_device_t *devp; @@ -973,6 +974,7 @@ static void json_devicelist_dump(char *reply, size_t replylen) reply[strlen(reply) - 1] = '\0'; (void)strlcat(reply, "]}\r\n", replylen); } +#endif /* SOCKET_EXPORT_ENABLE */ static void rstrip(char *str) /* strip trailing \r\n\t\SP from a string */ @@ -502,10 +502,7 @@ ssize_t gpsd_write(struct gps_device_t * session, char const *buf, size_t len) bool gpsd_next_hunt_setting(struct gps_device_t * session) /* advance to the next hunt setting */ { -#ifdef FIXED_PORT_SPEED - /* just the one fixed port speed... */ - static unsigned int rates[] = { FIXED_PORT_SPEED }; -#else /* FIXED_PORT_SPEED not defined */ +#ifndef FIXED_PORT_SPEED /* every rate we're likely to see on a GPS */ static unsigned int rates[] = { 0, 4800, 9600, 19200, 38400, 57600, 115200 }; |