Changeset e26c1fc for examples


Ignore:
Timestamp:
05/06/16 11:37:53 (6 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:
2b0eae9
Parents:
89aa13f (diff), ee0805a (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 develop

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.