Changeset 989 for vendor/current/ctdb/common
- Timestamp:
- Nov 25, 2016, 8:04:54 PM (9 years ago)
- Location:
- vendor/current/ctdb/common
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/ctdb/common/rb_tree.c
r988 r989 217 217 static inline void trbt_set_color(trbt_node_t *node, int color) 218 218 { 219 if ( (node==NULL) && (color==TRBT_BLACK)) {219 if (node == NULL) { 220 220 return; 221 221 } … … 224 224 static inline void trbt_set_color_left(trbt_node_t *node, int color) 225 225 { 226 if ( ((node==NULL)||(node->left==NULL)) && (color==TRBT_BLACK)) {226 if (node == NULL || node->left == NULL) { 227 227 return; 228 228 } … … 231 231 static inline void trbt_set_color_right(trbt_node_t *node, int color) 232 232 { 233 if ( ((node==NULL)||(node->right==NULL)) && (color==TRBT_BLACK)) {233 if (node == NULL || node->right == NULL) { 234 234 return; 235 235 } -
vendor/current/ctdb/common/system_linux.c
r988 r989 116 116 117 117 /* get the mac address */ 118 str ncpy(if_hwaddr.ifr_name, iface, sizeof(if_hwaddr.ifr_name)-1);118 strlcpy(if_hwaddr.ifr_name, iface, sizeof(if_hwaddr.ifr_name)); 119 119 ret = ioctl(s, SIOCGIFHWADDR, &if_hwaddr); 120 120 if ( ret < 0 ) { … … 202 202 203 203 DEBUG(DEBUG_DEBUG, (__location__ " Created SOCKET FD:%d for sending arp\n", s)); 204 str ncpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name));204 strlcpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name)); 205 205 if (ioctl(s, SIOCGIFINDEX, &ifr) < 0) { 206 206 DEBUG(DEBUG_CRIT,(__location__ " interface '%s' not found\n", iface)); … … 210 210 211 211 /* get the mac address */ 212 str ncpy(if_hwaddr.ifr_name, iface, sizeof(if_hwaddr.ifr_name)-1);212 strlcpy(if_hwaddr.ifr_name, iface, sizeof(if_hwaddr.ifr_name)); 213 213 ret = ioctl(s, SIOCGIFHWADDR, &if_hwaddr); 214 214 if ( ret < 0 ) { … … 589 589 } 590 590 591 str ncpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name)-1);591 strlcpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name)); 592 592 if (ioctl(s, SIOCGIFINDEX, &ifr) < 0 && errno == ENODEV) { 593 593 DEBUG(DEBUG_CRIT,(__location__ " interface '%s' not found\n", iface));
Note:
See TracChangeset
for help on using the changeset viewer.