Skip to content

Commit

Permalink
Use a more portable while structure - Fixes an issue where ordering o…
Browse files Browse the repository at this point in the history
…f links would not be incremented or decremented correctly using a uclibc system
  • Loading branch information
jhuntwork committed Dec 25, 2011
1 parent eb22093 commit ea3fa9f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions packages/initd-tools/initd-tools-while_fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff -Naur initd-tools-0.1.3/lib/installrm.c initd-tools-0.1.3-new/lib/installrm.c
--- initd-tools-0.1.3/lib/installrm.c 2008-11-02 12:59:36.000000000 -0500
+++ initd-tools-0.1.3-new/lib/installrm.c 2011-12-24 19:30:41.334992387 -0500
@@ -259,7 +259,8 @@
return;
}

- do {
+ while (((sk == SK_START) && (++(*prio) < 99)) ||
+ ((sk == SK_STOP) && (--(*prio) > 0))) {
/* Setup a glob pattern ([SK][0-9][0-9][![:digit:]]*) */
skc = (sk == SK_START) ? 'S' : 'K';
snprintf(pat, PRIOPATLEN, "%c%02d[![:digit:]]*",
@@ -269,6 +270,5 @@
glob(pat, 0, NULL, &globbuf);
if (!globbuf.gl_pathc)
break;
- } while (((sk == SK_START) && (++(*prio) < 99)) ||
- ((sk == SK_STOP) && (--(*prio) > 0)));
+ }
}

0 comments on commit ea3fa9f

Please sign in to comment.