removed a useless buffer (backported from bgk changes on his github repo)

This commit is contained in:
wowzaman12 2015-04-29 20:36:40 +00:00
parent 3f9d3fe4ca
commit d223decf2b
1 changed files with 8 additions and 17 deletions

View File

@ -168,7 +168,6 @@ extern int autoFireMaxCount;
#define REWIND_NUM 8 #define REWIND_NUM 8
#define REWIND_SIZE 400000 #define REWIND_SIZE 400000
#define SYSMSG_BUFFER_SIZE 1024
enum VIDEO_SIZE{ enum VIDEO_SIZE{
VIDEO_1X, VIDEO_2X, VIDEO_3X, VIDEO_4X, VIDEO_5X, VIDEO_6X, VIDEO_1X, VIDEO_2X, VIDEO_3X, VIDEO_4X, VIDEO_5X, VIDEO_6X,
@ -1570,12 +1569,6 @@ int main(int argc, char **argv)
if(optind < argc) { if(optind < argc) {
char *szFile = argv[optind]; char *szFile = argv[optind];
u32 len = strlen(szFile);
if (len > SYSMSG_BUFFER_SIZE)
{
fprintf(stderr,"%s :%s: File name too long\n",argv[0],szFile);
exit(-1);
}
utilStripDoubleExtension(szFile, filename); utilStripDoubleExtension(szFile, filename);
char *p = strrchr(filename, '.'); char *p = strrchr(filename, '.');
@ -1860,13 +1853,11 @@ int main(int argc, char **argv)
void systemMessage(int num, const char *msg, ...) void systemMessage(int num, const char *msg, ...)
{ {
char buffer[SYSMSG_BUFFER_SIZE*2];
va_list valist; va_list valist;
va_start(valist, msg); va_start(valist, msg);
vsprintf(buffer, msg, valist); vfprintf(stderr, msg, valist);
fprintf(stderr, "\n")
fprintf(stderr, "%s\n", buffer);
va_end(valist); va_end(valist);
} }