basicserver.cpp and zapitclient.cpp 2.try to fix compiler warnings, suggested by Seife

Origin commit data
------------------
Branch: ni/coolstream
Commit: 81d2228ddb
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2020-01-13 (Mon, 13 Jan 2020)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2020-01-13 17:19:28 +01:00
committed by vanhofen
parent 8146467dd8
commit dca0c98712
2 changed files with 4 additions and 5 deletions

View File

@@ -381,7 +381,7 @@ void CZapitClient::zaptoNvodSubService(const int num)
/* bouquets are numbered starting at 0 */
void CZapitClient::getBouquets(BouquetList& bouquets, const bool emptyBouquetsToo, const bool utf_encoded, channelsMode mode)
{
char buffer[30 + 1];
char buffer[30];
CZapitMessages::commandGetBouquets msg;
VALGRIND_PARANOIA;
@@ -400,9 +400,8 @@ void CZapitClient::getBouquets(BouquetList& bouquets, const bool emptyBouquetsTo
if (!utf_encoded)
{
buffer[30] = (char) 0x00;
strncpy(buffer, response.name, sizeof(buffer)-1);
snprintf(response.name,sizeof(buffer)-1,"%s",ZapitTools::UTF8_to_Latin1(buffer).c_str());
strncpy(buffer, response.name, sizeof(buffer));
snprintf(response.name,sizeof(buffer),"%s",ZapitTools::UTF8_to_Latin1(buffer).c_str());
}
bouquets.push_back(response);
}