#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-#include <syslog.h>
#include <fcntl.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <string.h>
-#include <dlfcn.h>
#include <errno.h>
#include "m_ematch.h"
int align, opnd = 0;
unsigned long offset = 0, layer = TCF_LAYER_NETWORK, mask = 0, value = 0;
int offset_present = 0, value_present = 0;
- struct tcf_em_cmp cmp;
-
- memset(&cmp, 0, sizeof(cmp));
+ struct tcf_em_cmp cmp = {};
#define PARSE_ERR(CARG, FMT, ARGS...) \
- em_parse_error(EINVAL, args, CARG, &cmp_ematch_util, FMT ,##ARGS)
+ em_parse_error(EINVAL, args, CARG, &cmp_ematch_util, FMT, ##ARGS)
if (args == NULL)
return PARSE_ERR(args, "cmp: missing arguments");
fprintf(fd, "u8 ");
else if (cmp->align == TCF_EM_ALIGN_U16)
fprintf(fd, "u16 ");
- else if (cmp->align == TCF_EM_ALIGN_U16)
+ else if (cmp->align == TCF_EM_ALIGN_U32)
fprintf(fd, "u32 ");
fprintf(fd, "at %d layer %d ", cmp->off, cmp->layer);