mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
bifcl: Other minor cleanups
This commit is contained in:
parent
8662b29ac6
commit
8e295df115
3 changed files with 5 additions and 8 deletions
|
@ -255,7 +255,7 @@ void init_alternative_mode()
|
||||||
|
|
||||||
static char name[1024];
|
static char name[1024];
|
||||||
strncpy(name, input_filename, sizeof(name) - 1);
|
strncpy(name, input_filename, sizeof(name) - 1);
|
||||||
name[sizeof(name) - 1] = 0;
|
name[sizeof(name) - 1] = '\0';
|
||||||
char* dot = strchr(name, '.');
|
char* dot = strchr(name, '.');
|
||||||
if ( dot )
|
if ( dot )
|
||||||
*dot = '\0';
|
*dot = '\0';
|
||||||
|
@ -264,7 +264,7 @@ void init_alternative_mode()
|
||||||
{
|
{
|
||||||
static char plugin_canon[1024];
|
static char plugin_canon[1024];
|
||||||
strncpy(plugin_canon, plugin, sizeof(plugin_canon) - 1);
|
strncpy(plugin_canon, plugin, sizeof(plugin_canon) - 1);
|
||||||
plugin_canon[sizeof(plugin_canon) - 1] = 0;
|
plugin_canon[sizeof(plugin_canon) - 1] = '\0';
|
||||||
char* colon = strstr(plugin_canon, "::");
|
char* colon = strstr(plugin_canon, "::");
|
||||||
|
|
||||||
if ( colon ) {
|
if ( colon ) {
|
||||||
|
@ -355,10 +355,9 @@ int main(int argc, char* argv[])
|
||||||
for ( int i = optind; i < argc; i++ )
|
for ( int i = optind; i < argc; i++ )
|
||||||
{
|
{
|
||||||
FILE* fp_input;
|
FILE* fp_input;
|
||||||
char* slash;
|
|
||||||
|
|
||||||
input_filename = input_filename_with_path = argv[i];
|
input_filename = input_filename_with_path = argv[i];
|
||||||
slash = strrchr(input_filename, '/');
|
char* slash = strrchr(input_filename, '/');
|
||||||
|
|
||||||
if ( (fp_input = fopen(input_filename, "r")) == NULL )
|
if ( (fp_input = fopen(input_filename, "r")) == NULL )
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ enum builtin_func_arg_type
|
||||||
|
|
||||||
extern const char* builtin_func_arg_type_bro_name[];
|
extern const char* builtin_func_arg_type_bro_name[];
|
||||||
|
|
||||||
class BuiltinFuncArg
|
class BuiltinFuncArg final
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BuiltinFuncArg(const char* arg_name, int arg_type);
|
BuiltinFuncArg(const char* arg_name, int arg_type);
|
||||||
|
@ -29,7 +29,7 @@ public:
|
||||||
void PrintCArg(FILE* fp, int n);
|
void PrintCArg(FILE* fp, int n);
|
||||||
void PrintValConstructor(FILE* fp);
|
void PrintValConstructor(FILE* fp);
|
||||||
|
|
||||||
protected:
|
private:
|
||||||
const char* name;
|
const char* name;
|
||||||
int type;
|
int type;
|
||||||
const char* type_str;
|
const char* type_str;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue