From: Felipe Contreras <felipe.contreras@gmail.com>
To: git@vger.kernel.org
Cc: Felipe Contreras <felipe.contreras@gmail.com>
Subject: [PATCH 12/20] alias: trivial style fix
Date: Sat, 12 Oct 2013 02:07:13 -0500 [thread overview]
Message-ID: <1381561636-20717-18-git-send-email-felipe.contreras@gmail.com> (raw)
In-Reply-To: <1381561636-20717-1-git-send-email-felipe.contreras@gmail.com>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
alias.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/alias.c b/alias.c
index eb9f08b..9938f03 100644
--- a/alias.c
+++ b/alias.c
@@ -5,7 +5,7 @@ static char *alias_val;
static int alias_lookup_cb(const char *k, const char *v, void *cb)
{
- if (!prefixcmp(k, "alias.") && !strcmp(k+6, alias_key)) {
+ if (!prefixcmp(k, "alias.") && !strcmp(k + 6, alias_key)) {
if (!v)
return config_error_nonbool(k);
alias_val = xstrdup(v);
@@ -34,7 +34,7 @@ int split_cmdline(char *cmdline, const char ***argv)
int src, dst, count = 0, size = 16;
char quoted = 0;
- *argv = xmalloc(sizeof(char *) * size);
+ *argv = xmalloc(sizeof(**argv) * size);
/* split alias_string */
(*argv)[count++] = cmdline;
@@ -45,7 +45,7 @@ int split_cmdline(char *cmdline, const char ***argv)
while (cmdline[++src]
&& isspace(cmdline[src]))
; /* skip */
- ALLOC_GROW(*argv, count+1, size);
+ ALLOC_GROW(*argv, count + 1, size);
(*argv)[count++] = cmdline + dst;
} else if (!quoted && (c == '\'' || c == '"')) {
quoted = c;
@@ -76,12 +76,13 @@ int split_cmdline(char *cmdline, const char ***argv)
return -SPLIT_CMDLINE_UNCLOSED_QUOTE;
}
- ALLOC_GROW(*argv, count+1, size);
+ ALLOC_GROW(*argv, count + 1, size);
(*argv)[count] = NULL;
return count;
}
-const char *split_cmdline_strerror(int split_cmdline_errno) {
- return split_cmdline_errors[-split_cmdline_errno-1];
+const char *split_cmdline_strerror(int split_cmdline_errno)
+{
+ return split_cmdline_errors[-split_cmdline_errno - 1];
}
--
1.8.4-fc
next prev parent reply other threads:[~2013-10-12 7:14 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-12 7:06 [PATCH 10/20] doc: git-foo was obsoleted several years ago Felipe Contreras
2013-10-12 7:06 ` [PATCH 00/20] Trivial paches Felipe Contreras
2013-10-12 7:06 ` [PATCH 03/20] pull: cleanup documentation Felipe Contreras
2013-10-12 7:06 ` [PATCH 20/20] add: avoid yoda conditions Felipe Contreras
2013-10-12 7:07 ` [PATCH 08/20] branch: trivial style fix Felipe Contreras
2013-10-12 7:07 ` [PATCH 15/20] pretty: " Felipe Contreras
2013-10-12 7:07 ` [PATCH 19/20] setup: trivial style fixes Felipe Contreras
2013-10-12 7:07 ` [PATCH 13/20] transport-helper: trivial style fix Felipe Contreras
2013-10-12 7:07 ` [PATCH 01/20] merge: simplify ff-only option Felipe Contreras
2013-10-12 7:07 ` [PATCH 16/20] revision: trivial style fixes Felipe Contreras
2013-10-12 9:08 ` Stefan Beller
2013-10-12 11:18 ` Felipe Contreras
2013-10-12 7:07 ` [PATCH 17/20] diff: trivial style fix Felipe Contreras
2013-10-12 7:07 ` [PATCH 05/20] remote: fix trivial memory leak Felipe Contreras
2013-10-12 7:07 ` [PATCH 07/20] shortlog: add missing declaration Felipe Contreras
2013-10-12 7:07 ` [PATCH 11/20] symbolic-ref: trivial style fix Felipe Contreras
2013-10-12 7:07 ` [PATCH 06/20] revision: add missing include Felipe Contreras
2013-10-12 7:07 ` [PATCH 18/20] run-command: trivial style fixes Felipe Contreras
2013-10-12 7:07 ` [PATCH 02/20] t: replace pulls with merges Felipe Contreras
2013-10-12 7:07 ` Felipe Contreras [this message]
2013-10-12 8:55 ` [PATCH 12/20] alias: trivial style fix Stefan Beller
2013-10-14 14:18 ` Jonathan Nieder
2013-10-14 21:21 ` Felipe Contreras
2013-10-12 7:07 ` [PATCH 04/20] fetch: add missing documentation Felipe Contreras
2013-10-12 7:07 ` [PATCH 09/20] sha1-name: trivial style cleanup Felipe Contreras
2013-10-12 7:07 ` [PATCH 14/20] describe: trivial style fixes Felipe Contreras
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1381561636-20717-18-git-send-email-felipe.contreras@gmail.com \
--to=felipe.contreras@gmail.com \
--cc=git@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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).