diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2026-02-12 18:31:00 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu.nakada@gmail.com> | 2026-02-12 19:17:44 +0900 |
| commit | 2d159fbbb6e3a123654a6a60b12654eedfcefd9d (patch) | |
| tree | 9ed80028d515eb8d388997e5dafec3dcff73953d /debug.c | |
| parent | b698c35590671e2b6f5920ca01c83ec4ebea610b (diff) | |
Use EXIT_SUCCESS/EXIT_FAILURE instead of 0/1
Diffstat (limited to 'debug.c')
| -rw-r--r-- | debug.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -368,7 +368,7 @@ setup_debug_log_filter(void) if (len >= MAX_DEBUG_LOG_FILTER_LEN) { fprintf(stderr, "too long: %s (max:%d)\n", str, MAX_DEBUG_LOG_FILTER_LEN - 1); - exit(1); + exit(EXIT_FAILURE); } // body @@ -396,7 +396,7 @@ setup_debug_log(void) debug_log.mem = (char *)malloc(MAX_DEBUG_LOG * MAX_DEBUG_LOG_MESSAGE_LEN); if (debug_log.mem == NULL) { fprintf(stderr, "setup_debug_log failed (can't allocate memory)\n"); - exit(1); + exit(EXIT_FAILURE); } ruby_debug_log_mode |= ruby_debug_log_memory; } @@ -424,7 +424,7 @@ setup_debug_log(void) break; default: fprintf(stderr, "can not parse RUBY_DEBUG_LOG filename: %s\n", log_config); - exit(1); + exit(EXIT_FAILURE); } } else { @@ -433,13 +433,13 @@ setup_debug_log(void) if (j >= DEBUG_LOG_MAX_PATH) { fprintf(stderr, "RUBY_DEBUG_LOG=%s is too long\n", log_config); - exit(1); + exit(EXIT_FAILURE); } } if ((debug_log.output = fopen(debug_log.output_file, "w")) == NULL) { fprintf(stderr, "can not open %s for RUBY_DEBUG_LOG\n", log_config); - exit(1); + exit(EXIT_FAILURE); } setvbuf(debug_log.output, NULL, _IONBF, 0); } |
