Changeset 69984 in vbox for trunk/src/VBox/Runtime/common/vfs
- Timestamp:
- Dec 7, 2017 3:36:52 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/vfs/vfschain.cpp
r69813 r69984 656 656 * 657 657 * @returns The offset of the end character relative to @a psz. 658 * @param psz The argument string. 658 * @param psz The argument string. 659 * @param chCloseParen The closing parenthesis. 659 660 */ 660 static size_t rtVfsChainSpecFindArgEnd(const char *psz )661 static size_t rtVfsChainSpecFindArgEnd(const char *psz, char const chCloseParen) 661 662 { 662 663 size_t off = 0; … … 664 665 while ( (ch = psz[off]) != '\0' 665 666 && ch != ',' 666 && ch != ')' 667 && ch != '}') 667 && ch != chCloseParen) 668 668 { 669 669 if ( ch == '\\' … … 778 778 break; 779 779 } 780 char const chCloseParen = (chOpenParen == '(' ? ')' : '}'); 780 781 pszSrc = RTStrStripL(pszSrc + cch + 1); 781 782 … … 783 784 * The name of the element provider. 784 785 */ 785 cch = rtVfsChainSpecFindArgEnd(pszSrc );786 cch = rtVfsChainSpecFindArgEnd(pszSrc, chCloseParen); 786 787 if (!cch) 787 788 { … … 800 801 { 801 802 pszSrc = RTStrStripL(pszSrc + 1); 802 cch = rtVfsChainSpecFindArgEnd(pszSrc );803 cch = rtVfsChainSpecFindArgEnd(pszSrc, chCloseParen); 803 804 rc = rtVfsChainSpecElementAddArg(pElement, pszSrc, cch, (uint16_t)(pszSrc - pszSpec)); 804 805 if (RT_FAILURE(rc)) … … 810 811 811 812 /* Must end with a right parentheses/curly. */ 812 if (*pszSrc != (chOpenParen == '(' ? ')' : '}'))813 if (*pszSrc != chCloseParen) 813 814 { 814 815 rc = VERR_VFS_CHAIN_EXPECTED_RIGHT_PARENTHESES;
Note:
See TracChangeset
for help on using the changeset viewer.