Changeset a984307 for examples


Ignore:
Timestamp:
07/20/16 16:01:58 (5 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, master, ndag_format, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
000726a
Parents:
733c8b4 (diff), 2b0eae9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge remote-tracking branch 'origin/develop' into libtrace4

Conflicts:

INSTALL
README
lib/format_dpdk.c
lib/trace.c
tools/tracesplit/tracesplit.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/tutorial/sourcedemo.c

    r8835f5a ree0805a  
    2828static inline void print_ip(struct sockaddr *ip) {
    2929
    30         char str[20];
     30        char str[40];
    3131       
    3232        /* Check the sockaddr family so we can cast it to the appropriate
     
    3737                /* Use inet_ntop to convert the address into a string using
    3838                 * dotted decimal notation */
    39                 printf("%s ", inet_ntop(AF_INET, &(v4->sin_addr), str, 20));
     39                printf("%s ", inet_ntop(AF_INET, &(v4->sin_addr), str, sizeof(str)));
    4040        }
    4141
     
    4545                /* Use inet_ntop to convert the address into a string using
    4646                 * IPv6 address notation */
    47                 printf("%s ", inet_ntop(AF_INET6, &(v6->sin6_addr), str, 20));
     47                printf("%s ", inet_ntop(AF_INET6, &(v6->sin6_addr), str, sizeof(str)));
    4848        }
    4949
Note: See TracChangeset for help on using the changeset viewer.