From: Sami Kerola <kerolasa@iki.fi>
To: util-linux@vger.kernel.org
Cc: kerolasa@iki.fi
Subject: [PATCH 1/2] blkid: use xalloc.h when possible
Date: Thu, 21 Mar 2013 21:47:14 +0000 [thread overview]
Message-ID: <1363902435-1487-1-git-send-email-kerolasa@iki.fi> (raw)
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
misc-utils/blkid.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/misc-utils/blkid.c b/misc-utils/blkid.c
index 78e0a93..fd27da7 100644
--- a/misc-utils/blkid.c
+++ b/misc-utils/blkid.c
@@ -49,6 +49,7 @@ extern int optind;
#include "closestream.h"
#include "ttyutils.h"
+#include "xalloc.h"
const char *progname = "blkid";
@@ -703,8 +704,8 @@ int main(int argc, char **argv)
break;
case 'L':
eval++;
- search_value = strdup(optarg);
- search_type = strdup("LABEL");
+ search_value = xstrdup(optarg);
+ search_type = xstrdup("LABEL");
break;
case 'n':
fltr_type = list_to_types(optarg, &fltr_flag);
@@ -714,8 +715,8 @@ int main(int argc, char **argv)
break;
case 'U':
eval++;
- search_value = strdup(optarg);
- search_type = strdup("UUID");
+ search_value = xstrdup(optarg);
+ search_type = xstrdup("UUID");
break;
case 'i':
lowprobe |= LOWPROBE_TOPOLOGY;
--
1.8.2
next reply other threads:[~2013-03-21 21:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-21 21:47 Sami Kerola [this message]
2013-03-21 21:47 ` [PATCH 2/2] docs: arch is gone, use delpart as usage() function example Sami Kerola
2013-03-26 9:55 ` Karel Zak
2013-03-26 9:54 ` [PATCH 1/2] blkid: use xalloc.h when possible Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1363902435-1487-1-git-send-email-kerolasa@iki.fi \
--to=kerolasa@iki.fi \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox