aboutsummaryrefslogtreecommitdiff
path: root/src/mountinfo.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-10-23 20:43:45 +0000
committerRoy Marples <roy@marples.name>2007-10-23 20:43:45 +0000
commit0764a6cb460b5bc63f7037988013d86208fca6b4 (patch)
tree84592a5859119d98f1d44c1f1b687ac2b7fa6312 /src/mountinfo.c
parentbf0cc2dac43bde5249ad2a918006e560382f86d0 (diff)
Stop using asprintf
Diffstat (limited to 'src/mountinfo.c')
-rw-r--r--src/mountinfo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mountinfo.c b/src/mountinfo.c
index ef3f636d..9121aa97 100644
--- a/src/mountinfo.c
+++ b/src/mountinfo.c
@@ -197,7 +197,9 @@ static char **find_mounts (struct args *args)
options = xstrdup (o->o_name);
else {
char *tmp = NULL;
- asprintf (&tmp, "%s,%s", options, o->o_name);
+ int l = strlen (options) + strlen (o->o_name) + 2;
+ tmp = xmalloc (sizeof (char) * l);
+ snprintf (tmp, l, "%s,%s", options, o->o_name);
free (options);
options = tmp;
}