bool zero = false;
int byte = bytex, tmp, a, b;
- if ((tmp = byte - 200) >= 0) {
+ tmp = byte - 200;
+ if (tmp >= 0) {
*pos++ = '2';
zero = true;
byte = tmp;
- } else if ((tmp = byte - 100) >= 0) {
- *pos++ = '1';
- zero = true;
- byte = tmp;
+ } else {
+ tmp = byte - 100;
+ if (tmp >= 0) {
+ *pos++ = '1';
+ zero = true;
+ byte = tmp;
+ }
}
/* make sure the compiler knows the value range of "byte" */
const char *frr_inet_ntop(int af, const void * restrict src,
char * restrict dst, socklen_t size)
- __attribute__((flatten)) DSO_SELF OPTIMIZE;
+ __attribute__((flatten)) OPTIMIZE;
const char *frr_inet_ntop(int af, const void * restrict src,
char * restrict dst, socklen_t size)
return dst;
}
-#ifndef INET_NTOP_NO_OVERRIDE
+#if !defined(INET_NTOP_NO_OVERRIDE) && !defined(__APPLE__)
/* we want to override libc inet_ntop, but make sure it shows up in backtraces
* as frr_inet_ntop (to avoid confusion while debugging)
*/
const char *inet_ntop(int af, const void *src, char *dst, socklen_t size)
- __attribute__((alias ("frr_inet_ntop"))) DSO_SELF;
+ __attribute__((alias ("frr_inet_ntop")));
#endif