[Pkg-running-devel] [antpm] 27/39: fix more static analysis problems
Kristof Ralovich
ralovich-guest at moszumanska.debian.org
Fri Nov 7 11:13:48 UTC 2014
This is an automated email from the git hooks/post-receive script.
ralovich-guest pushed a commit to branch upstream
in repository antpm.
commit bae40e4c66c22c043e471c1d238af22b6f720e0d
Author: RALOVICH, Kristof <tade60 at freemail.hu>
Date: Mon Aug 11 18:58:29 2014 +0200
fix more static analysis problems
from coverity
---
src/SerialTty.cpp | 1 +
src/gant/antlib.c | 2 +-
src/gant/gant.c | 5 +++--
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/SerialTty.cpp b/src/SerialTty.cpp
index 6612909..51b7771 100644
--- a/src/SerialTty.cpp
+++ b/src/SerialTty.cpp
@@ -69,6 +69,7 @@ struct SerialTtyPrivate
// runs in other thread
struct SerialTtyIOThread
{
+ SerialTtyIOThread() : rv(NULL) {}
void operator() (SerialTty* arg)
{
//printf("recvFunc, arg: %p\n", arg); fflush(stdout);
diff --git a/src/gant/antlib.c b/src/gant/antlib.c
index e879b8d..2b8c202 100644
--- a/src/gant/antlib.c
+++ b/src/gant/antlib.c
@@ -119,7 +119,7 @@ void get_data(int fd)
uchar event;
int found;
int srch;
- int next;
+ int next = 0;
nr = read(fd, buf+bufc, 20);
if (nr > 0)
diff --git a/src/gant/gant.c b/src/gant/gant.c
index 73b04cb..b146665 100644
--- a/src/gant/gant.c
+++ b/src/gant/gant.c
@@ -1327,9 +1327,10 @@ int main(int ac, char *av[])
/* default auth file // */
if (getenv("HOME"))
{
- authfile = malloc(strlen(getenv("HOME")) + strlen("/.gant") + 1);
+ const char* h = getenv("HOME");
+ authfile = malloc(strlen(h) + strlen("/.gant") + 1);
if (authfile)
- sprintf(authfile, "%s/.gant", getenv("HOME"));
+ sprintf(authfile, "%s/.gant", h);
}
progname = av[0];
while ((c = getopt(ac, av, "a:f:d:i:m:pvD:rnzh")) != -1)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-running/antpm.git
More information about the Pkg-running-devel
mailing list