All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] iputils: minor fixes
@ 2012-11-14 12:57 Jan Synacek
  2012-11-14 12:57 ` [PATCH 1/2] ping,ping6: Add newline to error message Jan Synacek
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jan Synacek @ 2012-11-14 12:57 UTC (permalink / raw)
  To: yoshfuji; +Cc: netdev, Jan Synacek

Jan Synacek (2):
  ping,ping6: Add newline to error message.
  ping: Don't free an unintialized value.

 ping.c        | 8 +++++---
 ping_common.c | 2 +-
 2 files changed, 6 insertions(+), 4 deletions(-)

-- 
1.7.11.7

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] ping,ping6: Add newline to error message.
  2012-11-14 12:57 [PATCH 0/2] iputils: minor fixes Jan Synacek
@ 2012-11-14 12:57 ` Jan Synacek
  2012-11-14 12:57 ` [PATCH 2/2] ping: Don't free an unintialized value Jan Synacek
  2012-11-14 15:23 ` [PATCH 0/2] iputils: minor fixes YOSHIFUJI Hideaki
  2 siblings, 0 replies; 4+ messages in thread
From: Jan Synacek @ 2012-11-14 12:57 UTC (permalink / raw)
  To: yoshfuji; +Cc: netdev, Jan Synacek

---
 ping_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ping_common.c b/ping_common.c
index 86dbeaa..1605ca9 100644
--- a/ping_common.c
+++ b/ping_common.c
@@ -265,7 +265,7 @@ void common_options(int ch)
 		char *endp;
 		mark = (int)strtoul(optarg, &endp, 10);
 		if (mark < 0 || *endp != '\0') {
-			fprintf(stderr, "mark cannot be negative");
+			fprintf(stderr, "mark cannot be negative\n");
 			exit(2);
 		}
 		options |= F_MARK;
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] ping: Don't free an unintialized value.
  2012-11-14 12:57 [PATCH 0/2] iputils: minor fixes Jan Synacek
  2012-11-14 12:57 ` [PATCH 1/2] ping,ping6: Add newline to error message Jan Synacek
@ 2012-11-14 12:57 ` Jan Synacek
  2012-11-14 15:23 ` [PATCH 0/2] iputils: minor fixes YOSHIFUJI Hideaki
  2 siblings, 0 replies; 4+ messages in thread
From: Jan Synacek @ 2012-11-14 12:57 UTC (permalink / raw)
  To: yoshfuji; +Cc: netdev, Jan Synacek

---
 ping.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/ping.c b/ping.c
index fe9ff8a..9de3d08 100644
--- a/ping.c
+++ b/ping.c
@@ -122,7 +122,7 @@ main(int argc, char **argv)
 	u_char *packet;
 	char *target;
 #ifdef USE_IDN
-	char *hnamebuf;
+	char *hnamebuf = NULL;
 #else
 	char hnamebuf[MAX_HOSTNAMELEN];
 #endif
@@ -263,8 +263,10 @@ main(int argc, char **argv)
 #ifdef USE_IDN
 			int rc;
 
-			free(hnamebuf);
-			hnamebuf = NULL;
+			if (hnamebuf) {
+				free(hnamebuf);
+				hnamebuf = NULL;
+			}
 
 			rc = idna_to_ascii_lz(target, &idn, 0);
 			if (rc != IDNA_SUCCESS) {
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] iputils: minor fixes
  2012-11-14 12:57 [PATCH 0/2] iputils: minor fixes Jan Synacek
  2012-11-14 12:57 ` [PATCH 1/2] ping,ping6: Add newline to error message Jan Synacek
  2012-11-14 12:57 ` [PATCH 2/2] ping: Don't free an unintialized value Jan Synacek
@ 2012-11-14 15:23 ` YOSHIFUJI Hideaki
  2 siblings, 0 replies; 4+ messages in thread
From: YOSHIFUJI Hideaki @ 2012-11-14 15:23 UTC (permalink / raw)
  To: Jan Synacek; +Cc: netdev, YOSHIFUJI Hideaki

Jan Synacek wrote:
> Jan Synacek (2):
>   ping,ping6: Add newline to error message.
>   ping: Don't free an unintialized value.

Both applied and pushed into public tree.
Thank you.

--yoshfuji

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-11-14 15:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-14 12:57 [PATCH 0/2] iputils: minor fixes Jan Synacek
2012-11-14 12:57 ` [PATCH 1/2] ping,ping6: Add newline to error message Jan Synacek
2012-11-14 12:57 ` [PATCH 2/2] ping: Don't free an unintialized value Jan Synacek
2012-11-14 15:23 ` [PATCH 0/2] iputils: minor fixes YOSHIFUJI Hideaki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.