diff options
author | Gary V. Vaughan <git@mlists.thewrittenword.com> | 2010-05-14 09:31:33 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-05-31 16:59:26 -0700 |
commit | 66dbfd55e38128db02eb340fcd89f54b734d4c6e (patch) | |
tree | 115937b86083814adcc97bc55424720e96da5f72 /remote.c | |
parent | ebef82776512f56eec4b6ac98b076369eb5a93fa (diff) | |
download | git-66dbfd55e38128db02eb340fcd89f54b734d4c6e.tar.gz |
Rewrite dynamic structure initializations to runtime assignment
Unfortunately, there are still plenty of production systems with
vendor compilers that choke unless all compound declarations can be
determined statically at compile time, for example hpux10.20 (I can
provide a comprehensive list of our supported platforms that exhibit
this problem if necessary).
This patch simply breaks apart any compound declarations with dynamic
initialisation expressions, and moves the initialisation until after
the last declaration in the same block, in all the places necessary to
have the offending compilers accept the code.
Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'remote.c')
-rw-r--r-- | remote.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -657,10 +657,9 @@ static struct refspec *parse_refspec_internal(int nr_refspec, const char **refsp int valid_fetch_refspec(const char *fetch_refspec_str) { - const char *fetch_refspec[] = { fetch_refspec_str }; struct refspec *refspec; - refspec = parse_refspec_internal(1, fetch_refspec, 1, 1); + refspec = parse_refspec_internal(1, &fetch_refspec_str, 1, 1); free_refspecs(refspec, 1); return !!refspec; } |