summaryrefslogtreecommitdiff
path: root/gpsd_json.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2019-03-14 16:39:28 -0400
committerEric S. Raymond <esr@thyrsus.com>2019-03-14 16:39:28 -0400
commit0433170e9f5a51ceaf098aa0199c1fd2f8001955 (patch)
tree12c8282441b7357b376f6457ff733ae62203aaea /gpsd_json.c
parent16df72bbf53c60abedd1464ea72129ffe6082476 (diff)
downloadgpsd-0433170e9f5a51ceaf098aa0199c1fd2f8001955.tar.gz
Document an assumption.
Diffstat (limited to 'gpsd_json.c')
-rw-r--r--gpsd_json.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gpsd_json.c b/gpsd_json.c
index 0bb42705..9bc93999 100644
--- a/gpsd_json.c
+++ b/gpsd_json.c
@@ -149,6 +149,7 @@ void json_tpv_dump(const struct gps_device_t *session,
assert(replylen > sizeof(char *));
(void)strlcpy(reply, "{\"class\":\"TPV\",", replylen);
if (gpsdata->dev.path[0] != '\0')
+ /* Note: Assumes /dev paths are always plain ASCII */
str_appendf(reply, replylen, "\"device\":\"%s\",", gpsdata->dev.path);
if (STATUS_DGPS_FIX <= gpsdata->status) {
/* to save rebuilding all the regressions, skip NO_FIX and FIX */