Changeset 2193905 for lib/format_duck.c


Ignore:
Timestamp:
11/29/18 10:12:59 (2 years ago)
Author:
Jacob Van Walraven <jcv9@…>
Branches:
develop
Children:
fdf23b8
Parents:
d74ca03
Message:

Apply changes required for pull request #81

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_duck.c

    rf6f3ae5 r2193905  
    3333
    3434#include <errno.h>
    35 #include <assert.h>
    3635#include <stdio.h>
    3736#include <fcntl.h>
     
    7069
    7170        if (!libtrace->format_data) {
    72                 trace_set_err(libtrace, TRACE_ERR_INIT_FAILED, "Unable to allocate memory duck_init_input()");
     71                trace_set_err(libtrace, TRACE_ERR_INIT_FAILED, "Unable to allocate memory for "
     72                        "format data inside duck_init_input()");
    7373                return 1;
    7474        }
     
    8282
    8383        if (!libtrace->format_data) {
    84                 trace_set_err_out(libtrace, TRACE_ERR_INIT_FAILED, "Unable to allocate memory duck_init_output()");
     84                trace_set_err_out(libtrace, TRACE_ERR_INIT_FAILED, "Unable to allocate memory for "
     85                        "format data inside duck_init_output()");
    8586                return -1;
    8687        }
     
    112113                        return -1;
    113114        }
    114         /*assert(0);*/
    115115        trace_set_err_out(libtrace, TRACE_ERR_UNKNOWN_OPTION,
    116116                "Unknown option in duck_config_output()");
     
    267267        }
    268268
    269         /*assert(OUTPUT->file);*/
    270269        if (!OUTPUT->file) {
    271270                trace_set_err_out(libtrace, TRACE_ERR_BAD_IO,
    272                         "Call init_output before write_packets() in duck_write_packet()");
     271                        "Attempted to write DUCK packets to a closed file, must call "
     272                                "trace_create_output() before calling trace_write_output()");
    273273                return -1;
    274274        }
Note: See TracChangeset for help on using the changeset viewer.