static int line_termination = '\n';
static int checkout_stage; /* default to checkout stage0 */
static int to_tempfile;
-static char topath[4][MAXPATHLEN+1];
+static char topath[4][PATH_MAX + 1];
static struct checkout state;
return -1;
}
-static int checkout_all(const char *prefix, int prefix_length)
+static void checkout_all(const char *prefix, int prefix_length)
{
int i, errs = 0;
struct cache_entry* last_ce = NULL;
* exit with the same code as die().
*/
exit(128);
- return 0;
}
static const char checkout_cache_usage[] =
to_tempfile = 1;
continue;
}
- if (!strncmp(arg, "--prefix=", 9)) {
+ if (!prefixcmp(arg, "--prefix=")) {
state.base_dir = arg+9;
state.base_dir_len = strlen(state.base_dir);
continue;
}
- if (!strncmp(arg, "--stage=", 8)) {
+ if (!prefixcmp(arg, "--stage=")) {
if (!strcmp(arg + 8, "all")) {
to_tempfile = 1;
checkout_stage = CHECKOUT_ALL;