Changeset ee0805a for examples


Ignore:
Timestamp:
05/02/16 11:43:02 (5 years ago)
Author:
Richard Sanger <rsangerarj@…>
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:
e26c1fc
Parents:
f030e50
Message:

#30 fix missed updating sizes given to inet_ntop

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/tutorial/sourcedemo.c

    r74516fe ree0805a  
    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.