Changeset 9c6aa95 for lib/format_erf.c


Ignore:
Timestamp:
10/07/05 17:31:17 (16 years ago)
Author:
Daniel Lawson <dlawson@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
9daf398
Parents:
5c88a60
Message:

cleaned up after compiling with -Wall -W

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_erf.c

    rdfc2673 r9c6aa95  
    2828 *
    2929 */
     30#define _GNU_SOURCE
    3031
    3132#include "config.h"
     
    5859#include <getopt.h>
    5960#include <stdio.h>
     61#include <string.h>
     62#include <stdlib.h>
    6063
    6164/* Catch undefined O_LARGEFILE on *BSD etc */
     
    174177static int erf_init_input(struct libtrace_t *libtrace) {
    175178        struct stat buf;
    176         struct hostent *he;
    177         struct sockaddr_in remote;
    178179        struct sockaddr_un unix_sock;
    179180        libtrace->format_data = (struct libtrace_format_data_t *)
     
    338339                                break;
    339340                        default:
    340                                 printf("Bad argument to erf: %s\n", opt);
     341                                printf("Bad argument to erf: %s\n", optarg);
    341342                                // maybe spit out some help here
    342343                                return -1;
     
    372373#endif
    373374        free(libtrace->format_data);
     375        return 0;
    374376}
    375377
    376378static int rtclient_fin_input(struct libtrace_t *libtrace) {
    377379        close(INPUT.fd);
     380        return 0;
    378381}
    379382
     
    385388#endif
    386389        free(libtrace->format_data);
     390
     391        return 0;
    387392}
    388393 
     
    455460        int numbytes;
    456461        int size;
    457         char buf[RP_BUFSIZE];
    458         dag_record_t *erfptr;
    459462        void *buffer = packet->buffer;
    460463        void *buffer2 = buffer;
     
    495498static int rtclient_read(struct libtrace_t *libtrace, void *buffer, size_t len) {
    496499        int numbytes;
    497         static short lctr = 0;
    498         struct dag_record_t *erfptr = 0;
    499         int rlen;
    500500
    501501        if (buffer == 0)
     
    527527        int size = 0;
    528528        char buf[RP_BUFSIZE];
    529         dag_record_t *erfptr = 0;
    530529        int read_required = 0;
    531530       
     
    719718}
    720719
    721 static int rtclient_get_fd(struct libtrace_packet_t *packet) {
     720static int rtclient_get_fd(const struct libtrace_packet_t *packet) {
    722721        return packet->trace->format_data->input.fd;
    723722}
    724723
    725 static int erf_get_fd(struct libtrace_packet_t *packet) {
     724static int erf_get_fd(const struct libtrace_packet_t *packet) {
    726725        return packet->trace->format_data->input.fd;
    727726}
Note: See TracChangeset for help on using the changeset viewer.