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 --- nanddump.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'nanddump.c') diff --git a/nanddump.c b/nanddump.c index 85ccd5d..4b3e14d 100644 --- a/nanddump.c +++ b/nanddump.c @@ -159,10 +159,7 @@ static void process_options(int argc, char * const argv[]) start_addr = simple_strtoll(optarg, &error); break; case 'f': - if (!(dumpfile = strdup(optarg))) { - perror("stddup"); - exit(EXIT_FAILURE); - } + dumpfile = xstrdup(optarg); break; case 'l': length = simple_strtoll(optarg, &error); -- cgit v1.2.3