x_basename -> leafname
authorJoseph C. Lehner <joseph.c.lehner@gmail.com>
Fri, 5 Feb 2016 16:41:00 +0000 (18:41 +0200)
committerJoseph C. Lehner <joseph.c.lehner@gmail.com>
Fri, 5 Feb 2016 16:41:00 +0000 (18:41 +0200)
tftp.c

diff --git a/tftp.c b/tftp.c
index 84050887eedaeb71609985e99ba7aeabb4960f7a..2c71b71cdca626d2d409ff4f23f8b781dd7d4b59 100644 (file)
--- a/tftp.c
+++ b/tftp.c
@@ -40,7 +40,7 @@ enum tftp_opcode {
        ERR  = 5
 };
 
-static const char *x_basename(const char *path)
+static const char *leafname(const char *path)
 {
        const char *slash, *bslash;
 
@@ -83,7 +83,7 @@ static void pkt_mkwrq(char *pkt, const char *filename)
 {
        size_t len = 2;
 
-       filename = x_basename(filename);
+       filename = leafname(filename);
        if (!is_netascii(filename) || strlen(filename) > 500) {
                fprintf(stderr, "Overlong/illegal filename; using 'firmware.bin'.");
                filename = "firmware.bin";