summaryrefslogtreecommitdiff
path: root/src/common/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/utils.c')
-rw-r--r--src/common/utils.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/common/utils.c b/src/common/utils.c
index 5ede86296..c168bd74e 100644
--- a/src/common/utils.c
+++ b/src/common/utils.c
@@ -95,8 +95,9 @@ void ShowDump(const void *buffer, size_t length) {
static char* checkpath(char *path, const char *srcpath)
{
// just make sure the char*path is not const
- char *p=path;
- if(NULL!=path && NULL!=srcpath)
+ char *p = path;
+ if (NULL == path || NULL == srcpath)
+ return path;
while(*srcpath) {
if (*srcpath=='/') {
*p++ = '\\';