- Timestamp:
- Dec 13, 2013 12:34:26 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/hardenedmain.cpp
r44529 r49892 5 5 6 6 /* 7 * Copyright (C) 2008-201 0Oracle Corporation7 * Copyright (C) 2008-2013 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 */ 17 17 18 #include <string.h>19 18 #include <VBox/sup.h> 19 20 21 /** 22 * No CRT on windows, so cook our own strcmp. 23 * 24 * @returns See man strcmp. 25 * @param psz1 The first string. 26 * @param psz2 The second string. 27 */ 28 static int MyStrCmp(const char *psz1, const char *psz2) 29 { 30 for (;;) 31 { 32 char ch1 = *psz1++; 33 char ch2 = *psz2++; 34 if (ch1 != ch2) 35 return ch1 < ch2 ? -1 : 1; 36 if (!ch1) 37 return 0; 38 } 39 } 20 40 21 41 … … 30 50 * options to start a VM in main.cpp and VBoxGlobal.cpp exactly, 31 51 * otherwise there will be weird error messages. */ 32 if ( ! ::strcmp(argv[i], "--startvm")33 || ! ::strcmp(argv[i], "-startvm"))52 if ( !MyStrCmp(argv[i], "--startvm") 53 || !MyStrCmp(argv[i], "-startvm")) 34 54 { 35 55 fFlags &= ~SUPSECMAIN_FLAGS_DONT_OPEN_DEV;
Note:
See TracChangeset
for help on using the changeset viewer.