@@ -126,7 +126,7 @@ bool MDNSResponder::stcMDNSServiceTxt::setKey(const char* p_pcKey,
126
126
releaseKey ();
127
127
if (p_stLength) {
128
128
if (allocKey (p_stLength)) {
129
- os_strncpy (m_pcKey, p_pcKey, p_stLength);
129
+ strncpy (m_pcKey, p_pcKey, p_stLength);
130
130
m_pcKey[p_stLength] = 0 ;
131
131
bResult = true ;
132
132
}
@@ -139,7 +139,7 @@ bool MDNSResponder::stcMDNSServiceTxt::setKey(const char* p_pcKey,
139
139
*/
140
140
bool MDNSResponder::stcMDNSServiceTxt::setKey (const char * p_pcKey) {
141
141
142
- return setKey (p_pcKey, (p_pcKey ? os_strlen (p_pcKey) : 0 ));
142
+ return setKey (p_pcKey, (p_pcKey ? strlen (p_pcKey) : 0 ));
143
143
}
144
144
145
145
/*
@@ -177,7 +177,7 @@ bool MDNSResponder::stcMDNSServiceTxt::setValue(const char* p_pcValue,
177
177
releaseValue ();
178
178
if (p_stLength) {
179
179
if (allocValue (p_stLength)) {
180
- os_strncpy (m_pcValue, p_pcValue, p_stLength);
180
+ strncpy (m_pcValue, p_pcValue, p_stLength);
181
181
m_pcValue[p_stLength] = 0 ;
182
182
bResult = true ;
183
183
}
@@ -193,7 +193,7 @@ bool MDNSResponder::stcMDNSServiceTxt::setValue(const char* p_pcValue,
193
193
*/
194
194
bool MDNSResponder::stcMDNSServiceTxt::setValue (const char * p_pcValue) {
195
195
196
- return setValue (p_pcValue, (p_pcValue ? os_strlen (p_pcValue) : 0 ));
196
+ return setValue (p_pcValue, (p_pcValue ? strlen (p_pcValue) : 0 ));
197
197
}
198
198
199
199
/*
@@ -237,9 +237,9 @@ size_t MDNSResponder::stcMDNSServiceTxt::length(void) const {
237
237
238
238
size_t stLength = 0 ;
239
239
if (m_pcKey) {
240
- stLength += os_strlen (m_pcKey); // Key
240
+ stLength += strlen (m_pcKey); // Key
241
241
stLength += 1 ; // '='
242
- stLength += (m_pcValue ? os_strlen (m_pcValue) : 0 ); // Value
242
+ stLength += (m_pcValue ? strlen (m_pcValue) : 0 ); // Value
243
243
}
244
244
return stLength;
245
245
}
@@ -461,15 +461,15 @@ bool MDNSResponder::stcMDNSServiceTxts::c_str(char* p_pcBuffer) {
461
461
*p_pcBuffer = 0 ;
462
462
for (stcMDNSServiceTxt* pTxt=m_pTxts; ((bResult) && (pTxt)); pTxt = pTxt->m_pNext ) {
463
463
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 ))))) {
465
465
if (pTxt != m_pTxts) {
466
466
*p_pcBuffer++ = ' ;' ;
467
467
}
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 ;
469
469
p_pcBuffer += stLength;
470
470
*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 ;
473
473
p_pcBuffer += stLength;
474
474
}
475
475
}
@@ -503,12 +503,12 @@ bool MDNSResponder::stcMDNSServiceTxts::buffer(char* p_pcBuffer) {
503
503
for (stcMDNSServiceTxt* pTxt=m_pTxts; ((bResult) && (pTxt)); pTxt = pTxt->m_pNext ) {
504
504
*(unsigned char *)p_pcBuffer++ = pTxt->length ();
505
505
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);
508
508
p_pcBuffer += stLength;
509
509
*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);
512
512
p_pcBuffer += stLength;
513
513
}
514
514
}
@@ -532,7 +532,7 @@ bool MDNSResponder::stcMDNSServiceTxts::compare(const MDNSResponder::stcMDNSServ
532
532
bResult = ((pOtherTxt) &&
533
533
(pTxt->m_pcValue ) &&
534
534
(pOtherTxt->m_pcValue ) &&
535
- (os_strlen (pTxt->m_pcValue ) == os_strlen (pOtherTxt->m_pcValue )) &&
535
+ (strlen (pTxt->m_pcValue ) == strlen (pOtherTxt->m_pcValue )) &&
536
536
(0 == strcmp (pTxt->m_pcValue , pOtherTxt->m_pcValue )));
537
537
}
538
538
// Compare B->A
@@ -541,7 +541,7 @@ bool MDNSResponder::stcMDNSServiceTxts::compare(const MDNSResponder::stcMDNSServ
541
541
bResult = ((pTxt) &&
542
542
(pOtherTxt->m_pcValue ) &&
543
543
(pTxt->m_pcValue ) &&
544
- (os_strlen (pOtherTxt->m_pcValue ) == os_strlen (pTxt->m_pcValue )) &&
544
+ (strlen (pOtherTxt->m_pcValue ) == strlen (pTxt->m_pcValue )) &&
545
545
(0 == strcmp (pOtherTxt->m_pcValue , pTxt->m_pcValue )));
546
546
}
547
547
}
@@ -660,7 +660,7 @@ bool MDNSResponder::stcMDNS_RRDomain::addLabel(const char* p_pcLabel,
660
660
bool bResult = false ;
661
661
662
662
size_t stLength = (p_pcLabel
663
- ? (os_strlen (p_pcLabel) + (p_bPrependUnderline ? 1 : 0 ))
663
+ ? (strlen (p_pcLabel) + (p_bPrependUnderline ? 1 : 0 ))
664
664
: 0 );
665
665
if ((MDNS_DOMAIN_LABEL_MAXLENGTH >= stLength) &&
666
666
(MDNS_DOMAIN_MAXLENGTH >= (m_u16NameLength + (1 + stLength)))) {
@@ -673,7 +673,7 @@ bool MDNSResponder::stcMDNS_RRDomain::addLabel(const char* p_pcLabel,
673
673
m_acName[m_u16NameLength++] = ' _' ;
674
674
--stLength;
675
675
}
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 ;
677
677
m_u16NameLength += stLength;
678
678
}
679
679
bResult = true ;
@@ -1235,10 +1235,10 @@ bool MDNSResponder::stcMDNSService::setName(const char* p_pcName) {
1235
1235
bool bResult = false ;
1236
1236
1237
1237
releaseName ();
1238
- size_t stLength = (p_pcName ? os_strlen (p_pcName) : 0 );
1238
+ size_t stLength = (p_pcName ? strlen (p_pcName) : 0 );
1239
1239
if (stLength) {
1240
1240
if ((bResult = (0 != (m_pcName = new char [stLength + 1 ])))) {
1241
- os_strncpy (m_pcName, p_pcName, stLength);
1241
+ strncpy (m_pcName, p_pcName, stLength);
1242
1242
m_pcName[stLength] = 0 ;
1243
1243
}
1244
1244
}
@@ -1268,10 +1268,10 @@ bool MDNSResponder::stcMDNSService::setService(const char* p_pcService) {
1268
1268
bool bResult = false ;
1269
1269
1270
1270
releaseService ();
1271
- size_t stLength = (p_pcService ? os_strlen (p_pcService) : 0 );
1271
+ size_t stLength = (p_pcService ? strlen (p_pcService) : 0 );
1272
1272
if (stLength) {
1273
1273
if ((bResult = (0 != (m_pcService = new char [stLength + 1 ])))) {
1274
- os_strncpy (m_pcService, p_pcService, stLength);
1274
+ strncpy (m_pcService, p_pcService, stLength);
1275
1275
m_pcService[stLength] = 0 ;
1276
1276
}
1277
1277
}
@@ -1301,10 +1301,10 @@ bool MDNSResponder::stcMDNSService::setProtocol(const char* p_pcProtocol) {
1301
1301
bool bResult = false ;
1302
1302
1303
1303
releaseProtocol ();
1304
- size_t stLength = (p_pcProtocol ? os_strlen (p_pcProtocol) : 0 );
1304
+ size_t stLength = (p_pcProtocol ? strlen (p_pcProtocol) : 0 );
1305
1305
if (stLength) {
1306
1306
if ((bResult = (0 != (m_pcProtocol = new char [stLength + 1 ])))) {
1307
- os_strncpy (m_pcProtocol, p_pcProtocol, stLength);
1307
+ strncpy (m_pcProtocol, p_pcProtocol, stLength);
1308
1308
m_pcProtocol[stLength] = 0 ;
1309
1309
}
1310
1310
}
0 commit comments