diff options
| author | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2011-10-19 11:08:50 +0000 |
|---|---|---|
| committer | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2011-10-19 11:08:50 +0000 |
| commit | 48cc86fa41d1956383bcb49d97bb0b3b67cf5a85 (patch) | |
| tree | eca9c34b41dfaf0497298fcf830e9ee5ca0123e8 /src/VBox/Runtime/common/string/RTStrCatP.cpp | |
| parent | 89350049df72176ef6fef57a758deac2dbe6e113 (diff) | |
| download | VirtualBox-svn-48cc86fa41d1956383bcb49d97bb0b3b67cf5a85.tar.gz | |
IPRT: Fixed unused variable warnings.
git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@39032 cfe28804-0f27-0410-a406-dd0f0b0b656f
Diffstat (limited to 'src/VBox/Runtime/common/string/RTStrCatP.cpp')
| -rw-r--r-- | src/VBox/Runtime/common/string/RTStrCatP.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/VBox/Runtime/common/string/RTStrCatP.cpp b/src/VBox/Runtime/common/string/RTStrCatP.cpp index 33c049d46e3..3c98097ebb6 100644 --- a/src/VBox/Runtime/common/string/RTStrCatP.cpp +++ b/src/VBox/Runtime/common/string/RTStrCatP.cpp @@ -4,7 +4,7 @@ */ /* - * Copyright (C) 2010 Oracle Corporation + * Copyright (C) 2010-2011 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; @@ -38,11 +38,12 @@ RTDECL(int) RTStrCatP(char **ppszDst, size_t *pcbDst, const char *pszSrc) * Advance past the current string in the output buffer and turn this into * a copy operation. */ - size_t cbDst = *pcbDst; - char *pszDst = RTStrEnd(*ppszDst, *pcbDst); + char *pszDstOrg = *ppszDst; + size_t cbDst = *pcbDst; + char *pszDst = RTStrEnd(pszDstOrg, cbDst); AssertReturn(pszDst, VERR_INVALID_PARAMETER); - *pcbDst -= pszDst - *ppszDst; *ppszDst = pszDst; + *pcbDst = cbDst - (pszDst - pszDstOrg); return RTStrCopyP(ppszDst, pcbDst, pszSrc); } |
