diff options
author | Mike Frysinger <vapier@gentoo.org> | 2013-05-08 19:01:55 -0400 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2013-07-01 08:56:04 +0300 |
commit | 450e9cb17d3d86e3e45fd427c85644ac64ec60a4 (patch) | |
tree | 39e0c67d2650164c9095ba90d47485b8170c571f /nanddump.c | |
parent | 1075562c9e34153b43c12ec5c0b173a1a593b92a (diff) |
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 <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'nanddump.c')
-rw-r--r-- | nanddump.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -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); |