i18n: simplify numeric error reporting
[gitweb.git] / builtin / config.c
index 1d7c6ef558bf7adcfb94ea454966667f987f7701..6cbf73369b2f6cf41430d78e0a5e8ffa18de6d15 100644 (file)
@@ -25,7 +25,6 @@ static char term = '\n';
 static int use_global_config, use_system_config, use_local_config;
 static struct git_config_source given_config_source;
 static int actions, types;
-static const char *get_color_slot, *get_colorbool_slot;
 static int end_null;
 static int respect_includes = -1;
 static int show_origin;
@@ -604,7 +603,7 @@ int cmd_config(int argc, const char **argv, const char *prefix)
                                      given_config_source.file : git_path("config"));
                if (use_global_config) {
                        int fd = open(config_file, O_CREAT | O_EXCL | O_WRONLY, 0666);
-                       if (fd) {
+                       if (fd >= 0) {
                                char *content = default_user_config();
                                write_str_in_full(fd, content);
                                free(content);