mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-02 12:52:10 +00:00
patch #7143: Add a few missing const qualifiers
This commit is contained in:
parent
a00448c35a
commit
e86446b785
@ -178,6 +178,9 @@ HISTORY
|
|||||||
|
|
||||||
++ Bugfixes:
|
++ Bugfixes:
|
||||||
|
|
||||||
|
2010-03-28: Luca Ceresoli
|
||||||
|
* ip_addr.c/.h: patch #7143: Add a few missing const qualifiers
|
||||||
|
|
||||||
2010-03-27: Luca Ceresoli
|
2010-03-27: Luca Ceresoli
|
||||||
* mib2.c: patch #7130: remove meaningless const qualifiers
|
* mib2.c: patch #7130: remove meaningless const qualifiers
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ const ip_addr_t ip_addr_broadcast = { IPADDR_BROADCAST };
|
|||||||
* @param netif the network interface against which the address is checked
|
* @param netif the network interface against which the address is checked
|
||||||
* @return returns non-zero if the address is a broadcast address
|
* @return returns non-zero if the address is a broadcast address
|
||||||
*/
|
*/
|
||||||
u8_t ip_addr_isbroadcast(ip_addr_t *addr, struct netif *netif)
|
u8_t ip_addr_isbroadcast(const ip_addr_t *addr, const struct netif *netif)
|
||||||
{
|
{
|
||||||
u32_t addr2test;
|
u32_t addr2test;
|
||||||
|
|
||||||
@ -228,7 +228,7 @@ ipaddr_aton(const char *cp, ip_addr_t *addr)
|
|||||||
* represenation of addr
|
* represenation of addr
|
||||||
*/
|
*/
|
||||||
char *
|
char *
|
||||||
ipaddr_ntoa(ip_addr_t *addr)
|
ipaddr_ntoa(const ip_addr_t *addr)
|
||||||
{
|
{
|
||||||
static char str[16];
|
static char str[16];
|
||||||
return ipaddr_ntoa_r(addr, str, 16);
|
return ipaddr_ntoa_r(addr, str, 16);
|
||||||
@ -243,7 +243,7 @@ ipaddr_ntoa(ip_addr_t *addr)
|
|||||||
* @return either pointer to buf which now holds the ASCII
|
* @return either pointer to buf which now holds the ASCII
|
||||||
* representation of addr or NULL if buf was too small
|
* representation of addr or NULL if buf was too small
|
||||||
*/
|
*/
|
||||||
char *ipaddr_ntoa_r(ip_addr_t *addr, char *buf, int buflen)
|
char *ipaddr_ntoa_r(const ip_addr_t *addr, char *buf, int buflen)
|
||||||
{
|
{
|
||||||
u32_t s_addr;
|
u32_t s_addr;
|
||||||
char inv[3];
|
char inv[3];
|
||||||
|
@ -181,7 +181,7 @@ extern const ip_addr_t ip_addr_broadcast;
|
|||||||
|
|
||||||
#define ip_addr_isany(addr1) ((addr1) == NULL || (addr1)->addr == IPADDR_ANY)
|
#define ip_addr_isany(addr1) ((addr1) == NULL || (addr1)->addr == IPADDR_ANY)
|
||||||
|
|
||||||
u8_t ip_addr_isbroadcast(ip_addr_t *, struct netif *);
|
u8_t ip_addr_isbroadcast(const ip_addr_t *, const struct netif *);
|
||||||
|
|
||||||
#define ip_addr_ismulticast(addr1) (((addr1)->addr & ntohl(0xf0000000UL)) == ntohl(0xe0000000UL))
|
#define ip_addr_ismulticast(addr1) (((addr1)->addr & ntohl(0xf0000000UL)) == ntohl(0xe0000000UL))
|
||||||
|
|
||||||
@ -212,8 +212,8 @@ u8_t ip_addr_isbroadcast(ip_addr_t *, struct netif *);
|
|||||||
u32_t ipaddr_addr(const char *cp);
|
u32_t ipaddr_addr(const char *cp);
|
||||||
int ipaddr_aton(const char *cp, ip_addr_t *addr);
|
int ipaddr_aton(const char *cp, ip_addr_t *addr);
|
||||||
/** returns ptr to static buffer; not reentrant! */
|
/** returns ptr to static buffer; not reentrant! */
|
||||||
char *ipaddr_ntoa(ip_addr_t *addr);
|
char *ipaddr_ntoa(const ip_addr_t *addr);
|
||||||
char *ipaddr_ntoa_r(ip_addr_t *addr, char *buf, int buflen);
|
char *ipaddr_ntoa_r(const ip_addr_t *addr, char *buf, int buflen);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user