summaryrefslogtreecommitdiff
path: root/namedev.c
diff options
context:
space:
mode:
Diffstat (limited to 'namedev.c')
-rw-r--r--namedev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/namedev.c b/namedev.c
index 268a3d5be6..9c94e69082 100644
--- a/namedev.c
+++ b/namedev.c
@@ -204,7 +204,7 @@ static int find_free_number(struct udevice *udev, const char *name)
info("find_free_number gone crazy (num=%d), aborted", num);
return -1;
}
- snprintf(filename, NAME_SIZE-1, "%s%d", name, num);
+ snprintf(filename, NAME_SIZE, "%s%d", name, num);
filename[NAME_SIZE-1] = '\0';
}
}