diff options
author | Simon Brandner <simon.brandner@partner.bmw.de> | 2013-02-05 14:16:10 +0100 |
---|---|---|
committer | Alexander Wenzel <Alexander.AW.Wenzel@bmw.de> | 2013-07-19 16:54:40 +0200 |
commit | 3bbfc218fd5053e95c6de274ef5a28ca80bcdee2 (patch) | |
tree | ff2ecd2ac569e8c2bbb3ac1cc0e5969025de7c9c /src/system/dlt-system-filetransfer.c | |
parent | e2943ff4cf2d7d2da4000e2ca35663a7c83675d7 (diff) | |
download | DLT-daemon-3bbfc218fd5053e95c6de274ef5a28ca80bcdee2.tar.gz |
some coverity fixes
fixed some merge problems
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
Diffstat (limited to 'src/system/dlt-system-filetransfer.c')
-rw-r--r-- | src/system/dlt-system-filetransfer.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/system/dlt-system-filetransfer.c b/src/system/dlt-system-filetransfer.c index a4b0aff..d33e6b9 100644 --- a/src/system/dlt-system-filetransfer.c +++ b/src/system/dlt-system-filetransfer.c @@ -67,7 +67,7 @@ extern DltSystemThreads threads; // From dlt_filetransfer -extern unsigned long getFileSerialNumber(const char* file); +extern unsigned long getFileSerialNumber(const char* file, int *ok); DLT_IMPORT_CONTEXT(dltsystem); DLT_DECLARE_CONTEXT(filetransferContext) @@ -96,7 +96,11 @@ char *unique_name(char *src) DLT_LOG(dltsystem, DLT_LOG_DEBUG, DLT_STRING("dlt-system-filetransfer, creating unique temporary file name.")); time_t t = time(NULL); - unsigned long l = getFileSerialNumber(src) ^ t; + int ok; + unsigned long l = getFileSerialNumber(src, &ok) ^ t; + if (!ok){ + return (char*) NULL; + } char *basename_f = basename(src); // Length of ULONG_MAX + 1 |