← Commit list

4217bab02

Rob Landley
Rob Landley
2006-02-26
SOURCE BUG Duration: 32s

Subject

Patch from Glenn McGrath to remove code that opens a file but does nothing with it.

SOURCE BUG

This commit was genuinely broken at the time (not related to our build system): scripts/config/mkconfigs.c (2005-08-01 - 2006-10-05 arasi) uretilen bbconfigopts.h icine .config satirlarini kacissiz, ham newline'larla gömüyordu - gecerli C degildi, busybox'un kendi bb_mkdep araci bile parse edemiyordu (7d219aab7 ile duzeltildi, mkconfigs shell scripte cevrildi)

→ Bu hatanin tam hikayesini ve duzeltme diffini gor

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

networking/ifupdown.c+1 -12
@@ -1157,7 +1157,6 @@ extern int ifupdown_main(int argc, char **argv)
{
int (*cmds) (struct interface_defn_t *) = NULL;
struct interfaces_file_t *defn;
- FILE *state_fp = NULL;
llist_t *state_list = NULL;
llist_t *target_list = NULL;
const char *interfaces = "/etc/network/interfaces";
@@ -1230,10 +1229,6 @@ extern int ifupdown_main(int argc, char **argv)
exit(EXIT_FAILURE);
}
- if (no_act) {
- state_fp = fopen(statefile, "r");
- }
-
/* Create a list of interfaces to work on */
if (do_all) {
if (cmds == iface_up) {
@@ -1398,9 +1393,8 @@ extern int ifupdown_main(int argc, char **argv)
/* Actually write the new state */
if (!no_act) {
+ FILE *state_fp = NULL;
- if (state_fp)
- fclose(state_fp);
state_fp = bb_xfopen(statefile, "a+");
if (ftruncate(fileno(state_fp), 0) < 0) {
@@ -1417,12 +1411,7 @@ extern int ifupdown_main(int argc, char **argv)
state_list = state_list->link;
}
fflush(state_fp);
- }
-
- /* Cleanup */
- if (state_fp != NULL) {
fclose(state_fp);
- state_fp = NULL;
}
if (any_failures)