All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miriam Rubio <mirucam@gmail.com>
To: git@vger.kernel.org
Cc: Tanushree Tumane <tanushreetumane@gmail.com>,
	Christian Couder <chriscool@tuxfamily.org>,
	Miriam Rubio <mirucam@gmail.com>
Subject: [Outreachy] [PATCH] bisect--helper: convert `*_warning` char pointers to char arrays.
Date: Fri, 13 Dec 2019 12:52:25 +0100	[thread overview]
Message-ID: <20191213115225.13291-1-mirucam@gmail.com> (raw)

From: Tanushree Tumane <tanushreetumane@gmail.com>

A char array creates a character array. Its size is the number
of elements plus one (compiler automatically adds '\0').
A char pointer creates a char array and a pointer to that char
array that means four extra for bytes for the pointer variable.

Let's convert `need_bad_and_good_revision_warning` and
`need_bisect_start_warning` char pointers to char arrays.

Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Tanushree Tumane <tanushreetumane@gmail.com>
Signed-off-by: Miriam Rubio <mirucam@gmail.com>
---
This patch is a new version of:
https://public-inbox.org/git/cadc46442d5c960caa58227092289fa2f44fb96f.1551003074.git.gitgitgadget@gmail.com/
sent previously by Tanushree.

 builtin/bisect--helper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c
index 3055b2bb50..1718df7f09 100644
--- a/builtin/bisect--helper.c
+++ b/builtin/bisect--helper.c
@@ -282,11 +282,11 @@ static int mark_good(const char *refname, const struct object_id *oid,
 	return 1;
 }
 
-static const char *need_bad_and_good_revision_warning =
+static const char need_bad_and_good_revision_warning[] =
 	N_("You need to give me at least one %s and %s revision.\n"
 	   "You can use \"git bisect %s\" and \"git bisect %s\" for that.");
 
-static const char *need_bisect_start_warning =
+static const char need_bisect_start_warning[] =
 	N_("You need to start by \"git bisect start\".\n"
 	   "You then need to give me at least one %s and %s revision.\n"
 	   "You can use \"git bisect %s\" and \"git bisect %s\" for that.");
-- 
2.21.0 (Apple Git-122.2)


             reply	other threads:[~2019-12-13 20:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-13 11:52 Miriam Rubio [this message]
2019-12-13 19:57 ` [Outreachy] [PATCH] bisect--helper: convert `*_warning` char pointers to char arrays Junio C Hamano
2019-12-14  8:09   ` Miriam R.

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=20191213115225.13291-1-mirucam@gmail.com \
    --to=mirucam@gmail.com \
    --cc=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=tanushreetumane@gmail.com \
    /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 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.