From 225229fa32f800052939709f4cc1ffc23f29fa05 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Roth?= Date: Wed, 9 Apr 2014 19:26:55 -0300 Subject: [PATCH] libdvbv5: fix asprintf compile warning in dvbv5-scan MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: André Roth Signed-off-by: Mauro Carvalho Chehab --- utils/dvb/dvbv5-scan.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/utils/dvb/dvbv5-scan.c b/utils/dvb/dvbv5-scan.c index 501b332..7eb3bf5 100644 --- a/utils/dvb/dvbv5-scan.c +++ b/utils/dvb/dvbv5-scan.c @@ -407,6 +407,7 @@ int main(int argc, char **argv) { struct arguments args; int err, lnb = -1,idx = -1; + int r; const struct argp argp = { .options = options, .parser = parse_opt, @@ -459,8 +460,12 @@ int main(int argc, char **argv) return -1; } - asprintf(&args.demux_dev, + r = asprintf(&args.demux_dev, "/dev/dvb/adapter%i/demux%i", args.adapter_dmx, args.demux); + if (r < 0) { + fprintf(stderr, "asprintf error\n" ); + return -1; + } if (verbose) fprintf(stderr, "using demux '%s'\n", args.demux_dev); -- 2.7.4