diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2012-05-11 05:42:57 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2012-05-11 05:42:57 -0400 |
commit | 8114c165fd8740067ef56577618297e1eccd8007 (patch) | |
tree | d14bf03af31faf9da1fd561763b9067bfa204a09 | |
parent | c8a5b43df68e0f8abbad02f07fda76085a5370f0 (diff) | |
download | gpsd-8114c165fd8740067ef56577618297e1eccd8007.tar.gz |
I don't think the NULL case is possible here, but let's make Coverity happy.
-rw-r--r-- | gpsd.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1144,7 +1144,7 @@ static void handle_request(struct subscriber_t *sub, /* user specified a path, try to assign it */ device = find_device(devconf.path); /* do not optimize away, we need 'device' later on! */ - if (!awaken(device)) { + if (device == NULL || !awaken(device)) { (void)snprintf(reply, replylen, "{\"class\":\"ERROR\",\"message\":\"Can't open %s.\"}\r\n", devconf.path); |