From 91924bb6fdd9c0707dbde82f57f76fd1bc74d153 Mon Sep 17 00:00:00 2001 From: Jon Schlueter Date: Mon, 21 Feb 2011 13:34:37 -0500 Subject: change add_device,find_device all take const char * --- doc/explan_gpsd.c.xml | 4 ++-- gpsd.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/explan_gpsd.c.xml b/doc/explan_gpsd.c.xml index 28e13590..c9b8c6ea 100644 --- a/doc/explan_gpsd.c.xml +++ b/doc/explan_gpsd.c.xml @@ -147,7 +147,7 @@ For every possible subscriber, check if the subscriber is in watcher mode and is interested in the gps device indicated in the calling parameter gps_device_t.If so, send the data via a call to throttled_write(). - static struct gps_device_t *find_device(char *device_name) + static struct gps_device_t *find_device(const char *device_name) For every possible channel, check if the channel is allocated and if the device on the channel is the one passed to us.If it is so, exit early and return the channel number.If there is no match, return a NULL. @@ -169,7 +169,7 @@ number allocated. - static bool add_device(char *device_name) + static bool add_device(const char *device_name) Add a device to the pool of those available. If in nowait mode, open it immediately; otherwise initialize it and make it available for future watches, but don't open it yet. diff --git a/gpsd.c b/gpsd.c index 3e39ff7a..de641b8e 100644 --- a/gpsd.c +++ b/gpsd.c @@ -594,7 +594,7 @@ static void deactivate_device(struct gps_device_t *device) /* *INDENT-OFF* */ /*@ -globstate @*/ -/*@null@*//*@observer@*/ static struct gps_device_t *find_device(char +/*@null@*//*@observer@*/ static struct gps_device_t *find_device(const char *device_name) /* find the device block for an existing device name */ { @@ -622,7 +622,7 @@ static bool open_device(struct gps_device_t *device) return true; } -static bool add_device(char *device_name) +static bool add_device(const char *device_name) /* add a device to the pool; open it right away if in nowait mode */ { struct gps_device_t *devp; -- cgit v1.2.1