summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2016-08-15 14:42:16 -0500
committerJoe Hershberger <joe.hershberger@ni.com>2016-08-22 14:20:11 -0500
commitf8b26c7adf4e097484a4679ac6f32ae11ce100c5 (patch)
treede1998a322c27ec9e0b97c4096c5ecf611a0e927 /net
parentaa7a648747d8c704a9a81c9e493d386930724e9d (diff)
downloadu-boot-f8b26c7adf4e097484a4679ac6f32ae11ce100c5.tar.gz
net: nfs: Remove separate buffer for default name
There is no reason to store the default filename in a separate buffer only to immediately copy it to the main name buffer. Just write it there directly and remove the other buffer. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'net')
-rw-r--r--net/nfs.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/nfs.c b/net/nfs.c
index 4a5a1ab2a9..d7aeef9162 100644
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -65,7 +65,6 @@ static int nfs_state;
#define STATE_READ_REQ 6
#define STATE_READLINK_REQ 7
-static char default_filename[64];
static char *nfs_filename;
static char *nfs_path;
static char nfs_path_buff[2048];
@@ -720,12 +719,11 @@ void nfs_start(void)
}
if (net_boot_file_name[0] == '\0') {
- sprintf(default_filename, "/nfsroot/%02X%02X%02X%02X.img",
+ sprintf(nfs_path, "/nfsroot/%02X%02X%02X%02X.img",
net_ip.s_addr & 0xFF,
(net_ip.s_addr >> 8) & 0xFF,
(net_ip.s_addr >> 16) & 0xFF,
(net_ip.s_addr >> 24) & 0xFF);
- strcpy(nfs_path, default_filename);
printf("*** Warning: no boot file name; using '%s'\n",
nfs_path);