diff --git a/merge-index.c b/merge-index.c
index 190e12fb7ceeb012a063f8c97b574e9650d95cc1..7027d7865971646f178690a150246d9bc4d674c0 100644 (file)
--- a/merge-index.c
+++ b/merge-index.c
-#include <sys/types.h>
-#include <sys/wait.h>
-
#include "cache.h"
#include "cache.h"
-static const char *pgm = NULL;
+static const char *pgm;
static const char *arguments[8];
static int one_shot, quiet;
static int err;
static void run_program(void)
{
static const char *arguments[8];
static int one_shot, quiet;
static int err;
static void run_program(void)
{
- int pid = fork(), status;
+ pid_t pid = fork();
+ int status;
if (pid < 0)
die("unable to fork");
if (pid < 0)
die("unable to fork");
break;
found++;
strcpy(hexbuf[stage], sha1_to_hex(ce->sha1));
break;
found++;
strcpy(hexbuf[stage], sha1_to_hex(ce->sha1));
- sprintf(ownbuf[stage], "%o", ntohl(ce->ce_mode) & (~S_IFMT));
+ sprintf(ownbuf[stage], "%o", ntohl(ce->ce_mode));
arguments[stage] = hexbuf[stage];
arguments[stage + 4] = ownbuf[stage];
} while (++pos < active_nr);
arguments[stage] = hexbuf[stage];
arguments[stage + 4] = ownbuf[stage];
} while (++pos < active_nr);