Incorrect buffer was used in size of and error printout. This patch corrects this.
Signed-off-by: Anders Selhammer <anders.selham...@est.tech> --- sk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sk.c b/sk.c index 0fe009a..69492d4 100644 --- a/sk.c +++ b/sk.c @@ -203,10 +203,10 @@ static int sk_interface_guidaddr(const char *name, unsigned char *guid) char *err; int res; - snprintf(file_name, sizeof buf, "/sys/class/net/%s/address", name); + snprintf(file_name, sizeof file_name, "/sys/class/net/%s/address", name); f = fopen(file_name, "r"); if (!f) { - pr_err("failed to open %s: %m", buf); + pr_err("failed to open %s: %m", file_name); return -1; } -- 1.8.3.1 _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel