@@ -126,7 +126,7 @@ bool MDNSResponder::stcMDNSServiceTxt::setKey(const char* p_pcKey,
126126 releaseKey ();
127127 if (p_stLength) {
128128 if (allocKey (p_stLength)) {
129- os_strncpy (m_pcKey, p_pcKey, p_stLength);
129+ strncpy (m_pcKey, p_pcKey, p_stLength);
130130 m_pcKey[p_stLength] = 0 ;
131131 bResult = true ;
132132 }
@@ -139,7 +139,7 @@ bool MDNSResponder::stcMDNSServiceTxt::setKey(const char* p_pcKey,
139139 */
140140bool MDNSResponder::stcMDNSServiceTxt::setKey (const char * p_pcKey) {
141141
142- return setKey (p_pcKey, (p_pcKey ? os_strlen (p_pcKey) : 0 ));
142+ return setKey (p_pcKey, (p_pcKey ? strlen (p_pcKey) : 0 ));
143143}
144144
145145/*
@@ -177,7 +177,7 @@ bool MDNSResponder::stcMDNSServiceTxt::setValue(const char* p_pcValue,
177177 releaseValue ();
178178 if (p_stLength) {
179179 if (allocValue (p_stLength)) {
180- os_strncpy (m_pcValue, p_pcValue, p_stLength);
180+ strncpy (m_pcValue, p_pcValue, p_stLength);
181181 m_pcValue[p_stLength] = 0 ;
182182 bResult = true ;
183183 }
@@ -193,7 +193,7 @@ bool MDNSResponder::stcMDNSServiceTxt::setValue(const char* p_pcValue,
193193 */
194194bool MDNSResponder::stcMDNSServiceTxt::setValue (const char * p_pcValue) {
195195
196- return setValue (p_pcValue, (p_pcValue ? os_strlen (p_pcValue) : 0 ));
196+ return setValue (p_pcValue, (p_pcValue ? strlen (p_pcValue) : 0 ));
197197}
198198
199199/*
@@ -237,9 +237,9 @@ size_t MDNSResponder::stcMDNSServiceTxt::length(void) const {
237237
238238 size_t stLength = 0 ;
239239 if (m_pcKey) {
240- stLength += os_strlen (m_pcKey); // Key
240+ stLength += strlen (m_pcKey); // Key
241241 stLength += 1 ; // '='
242- stLength += (m_pcValue ? os_strlen (m_pcValue) : 0 ); // Value
242+ stLength += (m_pcValue ? strlen (m_pcValue) : 0 ); // Value
243243 }
244244 return stLength;
245245}
@@ -461,15 +461,15 @@ bool MDNSResponder::stcMDNSServiceTxts::c_str(char* p_pcBuffer) {
461461 *p_pcBuffer = 0 ;
462462 for (stcMDNSServiceTxt* pTxt=m_pTxts; ((bResult) && (pTxt)); pTxt = pTxt->m_pNext ) {
463463 size_t stLength;
464- if ((bResult = (0 != (stLength = (pTxt->m_pcKey ? os_strlen (pTxt->m_pcKey ) : 0 ))))) {
464+ if ((bResult = (0 != (stLength = (pTxt->m_pcKey ? strlen (pTxt->m_pcKey ) : 0 ))))) {
465465 if (pTxt != m_pTxts) {
466466 *p_pcBuffer++ = ' ;' ;
467467 }
468- os_strncpy (p_pcBuffer, pTxt->m_pcKey , stLength); p_pcBuffer[stLength] = 0 ;
468+ strncpy (p_pcBuffer, pTxt->m_pcKey , stLength); p_pcBuffer[stLength] = 0 ;
469469 p_pcBuffer += stLength;
470470 *p_pcBuffer++ = ' =' ;
471- if ((stLength = (pTxt->m_pcValue ? os_strlen (pTxt->m_pcValue ) : 0 ))) {
472- os_strncpy (p_pcBuffer, pTxt->m_pcValue , stLength); p_pcBuffer[stLength] = 0 ;
471+ if ((stLength = (pTxt->m_pcValue ? strlen (pTxt->m_pcValue ) : 0 ))) {
472+ strncpy (p_pcBuffer, pTxt->m_pcValue , stLength); p_pcBuffer[stLength] = 0 ;
473473 p_pcBuffer += stLength;
474474 }
475475 }
@@ -503,12 +503,12 @@ bool MDNSResponder::stcMDNSServiceTxts::buffer(char* p_pcBuffer) {
503503 for (stcMDNSServiceTxt* pTxt=m_pTxts; ((bResult) && (pTxt)); pTxt = pTxt->m_pNext ) {
504504 *(unsigned char *)p_pcBuffer++ = pTxt->length ();
505505 size_t stLength;
506- if ((bResult = (0 != (stLength = (pTxt->m_pcKey ? os_strlen (pTxt->m_pcKey ) : 0 ))))) {
507- os_memcpy (p_pcBuffer, pTxt->m_pcKey , stLength);
506+ if ((bResult = (0 != (stLength = (pTxt->m_pcKey ? strlen (pTxt->m_pcKey ) : 0 ))))) {
507+ memcpy (p_pcBuffer, pTxt->m_pcKey , stLength);
508508 p_pcBuffer += stLength;
509509 *p_pcBuffer++ = ' =' ;
510- if ((stLength = (pTxt->m_pcValue ? os_strlen (pTxt->m_pcValue ) : 0 ))) {
511- os_memcpy (p_pcBuffer, pTxt->m_pcValue , stLength);
510+ if ((stLength = (pTxt->m_pcValue ? strlen (pTxt->m_pcValue ) : 0 ))) {
511+ memcpy (p_pcBuffer, pTxt->m_pcValue , stLength);
512512 p_pcBuffer += stLength;
513513 }
514514 }
@@ -532,7 +532,7 @@ bool MDNSResponder::stcMDNSServiceTxts::compare(const MDNSResponder::stcMDNSServ
532532 bResult = ((pOtherTxt) &&
533533 (pTxt->m_pcValue ) &&
534534 (pOtherTxt->m_pcValue ) &&
535- (os_strlen (pTxt->m_pcValue ) == os_strlen (pOtherTxt->m_pcValue )) &&
535+ (strlen (pTxt->m_pcValue ) == strlen (pOtherTxt->m_pcValue )) &&
536536 (0 == strcmp (pTxt->m_pcValue , pOtherTxt->m_pcValue )));
537537 }
538538 // Compare B->A
@@ -541,7 +541,7 @@ bool MDNSResponder::stcMDNSServiceTxts::compare(const MDNSResponder::stcMDNSServ
541541 bResult = ((pTxt) &&
542542 (pOtherTxt->m_pcValue ) &&
543543 (pTxt->m_pcValue ) &&
544- (os_strlen (pOtherTxt->m_pcValue ) == os_strlen (pTxt->m_pcValue )) &&
544+ (strlen (pOtherTxt->m_pcValue ) == strlen (pTxt->m_pcValue )) &&
545545 (0 == strcmp (pOtherTxt->m_pcValue , pTxt->m_pcValue )));
546546 }
547547 }
@@ -660,7 +660,7 @@ bool MDNSResponder::stcMDNS_RRDomain::addLabel(const char* p_pcLabel,
660660 bool bResult = false ;
661661
662662 size_t stLength = (p_pcLabel
663- ? (os_strlen (p_pcLabel) + (p_bPrependUnderline ? 1 : 0 ))
663+ ? (strlen (p_pcLabel) + (p_bPrependUnderline ? 1 : 0 ))
664664 : 0 );
665665 if ((MDNS_DOMAIN_LABEL_MAXLENGTH >= stLength) &&
666666 (MDNS_DOMAIN_MAXLENGTH >= (m_u16NameLength + (1 + stLength)))) {
@@ -673,7 +673,7 @@ bool MDNSResponder::stcMDNS_RRDomain::addLabel(const char* p_pcLabel,
673673 m_acName[m_u16NameLength++] = ' _' ;
674674 --stLength;
675675 }
676- os_strncpy (&(m_acName[m_u16NameLength]), p_pcLabel, stLength); m_acName[m_u16NameLength + stLength] = 0 ;
676+ strncpy (&(m_acName[m_u16NameLength]), p_pcLabel, stLength); m_acName[m_u16NameLength + stLength] = 0 ;
677677 m_u16NameLength += stLength;
678678 }
679679 bResult = true ;
@@ -1235,10 +1235,10 @@ bool MDNSResponder::stcMDNSService::setName(const char* p_pcName) {
12351235 bool bResult = false ;
12361236
12371237 releaseName ();
1238- size_t stLength = (p_pcName ? os_strlen (p_pcName) : 0 );
1238+ size_t stLength = (p_pcName ? strlen (p_pcName) : 0 );
12391239 if (stLength) {
12401240 if ((bResult = (0 != (m_pcName = new char [stLength + 1 ])))) {
1241- os_strncpy (m_pcName, p_pcName, stLength);
1241+ strncpy (m_pcName, p_pcName, stLength);
12421242 m_pcName[stLength] = 0 ;
12431243 }
12441244 }
@@ -1268,10 +1268,10 @@ bool MDNSResponder::stcMDNSService::setService(const char* p_pcService) {
12681268 bool bResult = false ;
12691269
12701270 releaseService ();
1271- size_t stLength = (p_pcService ? os_strlen (p_pcService) : 0 );
1271+ size_t stLength = (p_pcService ? strlen (p_pcService) : 0 );
12721272 if (stLength) {
12731273 if ((bResult = (0 != (m_pcService = new char [stLength + 1 ])))) {
1274- os_strncpy (m_pcService, p_pcService, stLength);
1274+ strncpy (m_pcService, p_pcService, stLength);
12751275 m_pcService[stLength] = 0 ;
12761276 }
12771277 }
@@ -1301,10 +1301,10 @@ bool MDNSResponder::stcMDNSService::setProtocol(const char* p_pcProtocol) {
13011301 bool bResult = false ;
13021302
13031303 releaseProtocol ();
1304- size_t stLength = (p_pcProtocol ? os_strlen (p_pcProtocol) : 0 );
1304+ size_t stLength = (p_pcProtocol ? strlen (p_pcProtocol) : 0 );
13051305 if (stLength) {
13061306 if ((bResult = (0 != (m_pcProtocol = new char [stLength + 1 ])))) {
1307- os_strncpy (m_pcProtocol, p_pcProtocol, stLength);
1307+ strncpy (m_pcProtocol, p_pcProtocol, stLength);
13081308 m_pcProtocol[stLength] = 0 ;
13091309 }
13101310 }
0 commit comments