patch-1.3.68 linux/net/netrom/nr_route.c
Next file: linux/net/netrom/nr_subr.c
Previous file: linux/net/netrom/nr_out.c
Back to the patch index
Back to the overall index
- Lines: 61
- Date:
Wed Feb 21 08:33:27 1996
- Orig file:
v1.3.67/linux/net/netrom/nr_route.c
- Orig date:
Mon Dec 11 15:42:11 1995
diff -u --recursive --new-file v1.3.67/linux/net/netrom/nr_route.c linux/net/netrom/nr_route.c
@@ -88,21 +88,20 @@
if ((nr_neigh = (struct nr_neigh *)kmalloc(sizeof(*nr_neigh), GFP_ATOMIC)) == NULL)
return -ENOMEM;
- memcpy(&nr_neigh->callsign, ax25, sizeof(ax25_address));
-
- nr_neigh->digipeat= NULL;
- nr_neigh->dev = dev;
- nr_neigh->quality = nr_default.quality;
- nr_neigh->locked = 0;
- nr_neigh->count = 0;
- nr_neigh->number = nr_neigh_no++;
+ nr_neigh->callsign = *ax25;
+ nr_neigh->digipeat = NULL;
+ nr_neigh->dev = dev;
+ nr_neigh->quality = nr_default.quality;
+ nr_neigh->locked = 0;
+ nr_neigh->count = 0;
+ nr_neigh->number = nr_neigh_no++;
if (ax25_digi != NULL) {
if ((nr_neigh->digipeat = kmalloc(sizeof(*ax25_digi), GFP_KERNEL)) == NULL) {
kfree_s(nr_neigh, sizeof(*nr_neigh));
return -ENOMEM;
}
- memcpy(nr_neigh->digipeat, ax25_digi, sizeof(*ax25_digi));
+ *nr_neigh->digipeat = *ax25_digi;
}
save_flags(flags);
@@ -118,7 +117,7 @@
if ((nr_node = (struct nr_node *)kmalloc(sizeof(*nr_node), GFP_ATOMIC)) == NULL)
return -ENOMEM;
- memcpy(&nr_node->callsign, nr, sizeof(ax25_address));
+ nr_node->callsign = *nr;
memcpy(&nr_node->mnemonic, mnemonic, sizeof(nr_node->mnemonic));
nr_node->which = 0;
@@ -355,14 +354,13 @@
if ((nr_neigh = (struct nr_neigh *)kmalloc(sizeof(*nr_neigh), GFP_ATOMIC)) == NULL)
return -ENOMEM;
- memcpy(&nr_neigh->callsign, callsign, sizeof(ax25_address));
-
- nr_neigh->digipeat= NULL;
- nr_neigh->dev = dev;
- nr_neigh->quality = quality;
- nr_neigh->locked = 1;
- nr_neigh->count = 0;
- nr_neigh->number = nr_neigh_no++;
+ nr_neigh->callsign = *callsign;
+ nr_neigh->digipeat = NULL;
+ nr_neigh->dev = dev;
+ nr_neigh->quality = quality;
+ nr_neigh->locked = 1;
+ nr_neigh->count = 0;
+ nr_neigh->number = nr_neigh_no++;
save_flags(flags);
cli();
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this