From 450e9cb17d3d86e3e45fd427c85644ac64ec60a4 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 8 May 2013 19:01:55 -0400 Subject: use xstrdup in a few more places These call sites either assume there is no failure (they deref the pointer right away), or the exit themselves. Use xstrdup() instead. Signed-off-by: Mike Frysinger Signed-off-by: Artem Bityutskiy --- mkfs.ubifs/mkfs.ubifs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mkfs.ubifs') diff --git a/mkfs.ubifs/mkfs.ubifs.c b/mkfs.ubifs/mkfs.ubifs.c index 427e37d..f9977bc 100644 --- a/mkfs.ubifs/mkfs.ubifs.c +++ b/mkfs.ubifs/mkfs.ubifs.c @@ -534,7 +534,7 @@ static int get_options(int argc, char**argv) return err_msg("bad maximum LEB count"); break; case 'o': - output = strdup(optarg); + output = xstrdup(optarg); break; case 'D': tbl_file = optarg; @@ -627,7 +627,7 @@ static int get_options(int argc, char**argv) } if (optind != argc && !output) - output = strdup(argv[optind]); + output = xstrdup(argv[optind]); if (!output) return err_msg("not output device or file specified"); -- cgit v1.2.3