mirror of
https://github.com/rehlds/rehlds.git
synced 2025-01-01 01:25:38 +03:00
Merge pull request #353 from In-line/UseFuncWheneverPossible
Use __func__ whenever possible.
This commit is contained in:
commit
28d4b4e559
@ -228,22 +228,22 @@ void HPAK_AddLump(qboolean bUseQueue, char *pakname, struct resource_s *pResourc
|
||||
|
||||
if (pakname == NULL)
|
||||
{
|
||||
Con_Printf("HPAK_AddLump called with invalid arguments: no .pak filename\n");
|
||||
Con_Printf("%s called with invalid arguments: no .pak filename\n", __func__);
|
||||
return;
|
||||
}
|
||||
if (!pResource)
|
||||
{
|
||||
Con_Printf("HPAK_AddLump called with invalid arguments: no lump to add\n");
|
||||
Con_Printf("%s called with invalid arguments: no lump to add\n", __func__);
|
||||
return;
|
||||
}
|
||||
if (!pData && !fpSource)
|
||||
{
|
||||
Con_Printf("HPAK_AddLump called with invalid arguments: no file handle\n");
|
||||
Con_Printf("%s called with invalid arguments: no file handle\n", __func__);
|
||||
return;
|
||||
}
|
||||
if (pResource->nDownloadSize < 1024 || (unsigned int)pResource->nDownloadSize > MAX_FILE_SIZE)
|
||||
{
|
||||
Con_Printf("HPAK_AddLump called with bogus lump, size: %i\n", pResource->nDownloadSize);
|
||||
Con_Printf("%s called with bogus lump, size: %i\n", __func__, pResource->nDownloadSize);
|
||||
return;
|
||||
}
|
||||
Q_memset(&ctx, 0, sizeof(MD5Context_t));
|
||||
@ -264,7 +264,7 @@ void HPAK_AddLump(qboolean bUseQueue, char *pakname, struct resource_s *pResourc
|
||||
MD5Final(md5, &ctx);
|
||||
if (Q_memcmp(pResource->rgucMD5_hash, md5, sizeof(md5)) != 0)
|
||||
{
|
||||
Con_Printf("HPAK_AddLump called with bogus lump, md5 mismatch\n");
|
||||
Con_Printf("%s called with bogus lump, md5 mismatch\n", __func__);
|
||||
Con_Printf("Purported: %s\n", MD5_Print(pResource->rgucMD5_hash));
|
||||
Con_Printf("Actual : %s\n", MD5_Print(md5));
|
||||
Con_Printf("Ignoring lump addition\n");
|
||||
@ -312,7 +312,7 @@ void HPAK_AddLump(qboolean bUseQueue, char *pakname, struct resource_s *pResourc
|
||||
FS_Close(iRead);
|
||||
FS_Close(iWrite);
|
||||
FS_Unlink(szTempName);
|
||||
Con_Printf("Invalid .hpk version in HPAK_AddLump\n");
|
||||
Con_Printf("Invalid .hpk version in %s\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -631,7 +631,7 @@ void Netchan_CheckForCompletion(netchan_t *chan, int stream, int intotalbuffers)
|
||||
Cbuf_AddText(szCommand);
|
||||
return;
|
||||
}
|
||||
Con_Printf("Netchan_CheckForCompletion: Lost/dropped fragment would cause stall, retrying connection\n");
|
||||
Con_Printf("%s: Lost/dropped fragment would cause stall, retrying connection\n", __func__);
|
||||
Cbuf_AddText("retry\n");
|
||||
}
|
||||
|
||||
@ -1430,7 +1430,7 @@ qboolean Netchan_CopyNormalFragments(netchan_t *chan)
|
||||
|
||||
if (!chan->incomingbufs[FRAG_NORMAL_STREAM])
|
||||
{
|
||||
Con_Printf("Netchan_CopyNormalFragments: Called with no fragments readied\n");
|
||||
Con_Printf("%s: Called with no fragments readied\n", __func__);
|
||||
chan->incomingready[FRAG_NORMAL_STREAM] = FALSE;
|
||||
return FALSE;
|
||||
}
|
||||
@ -1466,11 +1466,11 @@ qboolean Netchan_CopyNormalFragments(netchan_t *chan)
|
||||
{
|
||||
if (chan->player_slot == 0)
|
||||
{
|
||||
Con_Printf("Netchan_CopyNormalFragments: Incoming overflowed\n");
|
||||
Con_Printf("%s: Incoming overflowed\n", __func__);
|
||||
}
|
||||
else
|
||||
{
|
||||
Con_Printf("Netchan_CopyNormalFragments: Incoming overflowed from %s\n", g_psvs.clients[chan->player_slot - 1].name);
|
||||
Con_Printf("%s: Incoming overflowed from %s\n", __func__, g_psvs.clients[chan->player_slot - 1].name);
|
||||
}
|
||||
|
||||
SZ_Clear(&net_message);
|
||||
@ -1517,7 +1517,7 @@ qboolean Netchan_CopyFileFragments(netchan_t *chan)
|
||||
p = chan->incomingbufs[FRAG_FILE_STREAM];
|
||||
if (!p)
|
||||
{
|
||||
Con_Printf("Netchan_CopyFileFragments: Called with no fragments readied\n");
|
||||
Con_Printf("%s: Called with no fragments readied\n", __func__);
|
||||
chan->incomingready[FRAG_FILE_STREAM] = FALSE;
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -3576,13 +3576,13 @@ void SV_ProcessFile(client_t *cl, char *filename)
|
||||
|
||||
if (!bFound)
|
||||
{
|
||||
Con_Printf("SV_ProcessFile: Unrequested decal\n");
|
||||
Con_Printf("%s: Unrequested decal\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
if (resource->nDownloadSize != cl->netchan.tempbuffersize)
|
||||
{
|
||||
Con_Printf("SV_ProcessFile: Downloaded %i bytes for purported %i byte file\n", cl->netchan.tempbuffersize, resource->nDownloadSize);
|
||||
Con_Printf("%s: Downloaded %i bytes for purported %i byte file\n", __func__, cl->netchan.tempbuffersize, resource->nDownloadSize);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user