aboutsummaryrefslogtreecommitdiff
path: root/util-linux/mdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux/mdev.c')
-rw-r--r--util-linux/mdev.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/util-linux/mdev.c b/util-linux/mdev.c
index bf07aebb3..a32c04f6b 100644
--- a/util-linux/mdev.c
+++ b/util-linux/mdev.c
@@ -180,8 +180,9 @@ static void make_device(char *path, int delete)
180 /* substitute %1..9 with off[1..9], if any */ 180 /* substitute %1..9 with off[1..9], if any */
181 n = 0; 181 n = 0;
182 s = val; 182 s = val;
183 while (*s && *s++ == '%') 183 while (*s)
184 n++; 184 if (*s++ == '%')
185 n++;
185 186
186 p = alias = xzalloc(strlen(val) + n * strlen(device_name)); 187 p = alias = xzalloc(strlen(val) + n * strlen(device_name));
187 s = val + 1; 188 s = val + 1;