- Timestamp:
- Feb 14, 2018 4:14:36 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/UnattendedImpl.cpp
r71011 r71012 740 740 centos-release-4-7.x86_64.rpm, centos-release-4-4.3.i386.rpm 741 741 centos-release-5-3.el5.centos.1.x86_64.rpm */ 742 char *psz;743 742 if ( (psz = strstr(DirEntry.szName, "-release-")) != NULL 744 743 || (psz = strstr(DirEntry.szName, "-RELEASE-")) != NULL) … … 759 758 760 759 /* Did we find anything relvant? */ 761 char *pszVersion= szRpmDb;762 if (!RT_C_IS_DIGIT(*psz Version))763 psz Version= szReleaseRpm;764 if (RT_C_IS_DIGIT(*psz Version))760 psz = szRpmDb; 761 if (!RT_C_IS_DIGIT(*psz)) 762 psz = szReleaseRpm; 763 if (RT_C_IS_DIGIT(*psz)) 765 764 { 766 765 /* Convert '-' to '.' and strip stuff which doesn't look like a version string. */ 767 char *pszCur = psz Version+ 1;766 char *pszCur = psz + 1; 768 767 for (char ch = *pszCur; ch != '\0'; ch = *++pszCur) 769 768 if (ch == '-') … … 774 773 break; 775 774 } 776 while (&pszCur[-1] != psz Version&& pszCur[-1] == '.')775 while (&pszCur[-1] != psz && pszCur[-1] == '.') 777 776 *--pszCur = '\0'; 778 777 779 778 /* Set it and stop looking. */ 780 try { mStrDetectedOSVersion = psz Version; }779 try { mStrDetectedOSVersion = psz; } 781 780 catch (std::bad_alloc) { return E_OUTOFMEMORY; } 782 781 break;
Note:
See TracChangeset
for help on using the changeset viewer.