History

Remove the now unused count parameter to WelsStrncpy

Also remove manual null termination as WelsStrncpy now always takes care of it.

Martin Storsjö committed 12 years ago

Commit 9840f111 parent a16ccc06 files · +11 −15Browse files

Showing the changes to codec/encoder/core/src/property.cpp (1 of 6 files). Show all

Unified · Split

codec/encoder/core/src/property.cpp+4−8
@@ -68,8 +68,7 @@ int32_t GetCodeName (str_t* pBuf, int32_t iSize) { · 67 unmodified lines
6868 if (iSize <= iLen)
6969 return 0;
7070
71− pBuf[iLen] = '\0';
72− WelsStrncpy (pBuf, iSize, WELS_CODE_NAME, iLen); // confirmed_safe_unsafe_usage
71+ WelsStrncpy (pBuf, iSize, WELS_CODE_NAME); // confirmed_safe_unsafe_usage
7372
7473 return iLen;
7574 }
@@ -90,8 +89,7 @@ int32_t GetLibName (str_t* pBuf, int32_t iSize) { · 14 unmodified lines
9089 if (iSize <= iLen)
9190 return 0;
9291
93− pBuf[iLen] = '\0';
94− WelsStrncpy (pBuf, iSize, WELS_LIB_NAME, iLen); // confirmed_safe_unsafe_usage
92+ WelsStrncpy (pBuf, iSize, WELS_LIB_NAME); // confirmed_safe_unsafe_usage
9593
9694 return iLen;
9795 }
@@ -112,8 +110,7 @@ int32_t GetVerNum (str_t* pBuf, int32_t iSize) { · 14 unmodified lines
112110 if (iSize <= iLen)
113111 return 0;
114112
115− pBuf[iLen] = '\0';
116− WelsStrncpy (pBuf, iSize, WELS_VERSION_STR, iLen); // confirmed_safe_unsafe_usage
113+ WelsStrncpy (pBuf, iSize, WELS_VERSION_STR); // confirmed_safe_unsafe_usage
117114
118115 return iLen;
119116 }
@@ -134,8 +131,7 @@ int32_t GetIdentInfo (str_t* pBuf, int32_t iSize) { · 14 unmodified lines
134131 if (iSize <= iLen)
135132 return 0;
136133
137− pBuf[iLen] = '\0';
138− WelsStrncpy (pBuf, iSize, WELS_IDENT, iLen); // confirmed_safe_unsafe_usage
134+ WelsStrncpy (pBuf, iSize, WELS_IDENT); // confirmed_safe_unsafe_usage
139135
140136 return iLen;
141137 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t