projects
/
petitboot
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
98f2640
)
lib/system: Don't modify dir parameter to pb_rmdir_recursive
author
Jeremy Kerr
<jk@ozlabs.org>
Thu, 26 Sep 2013 02:32:18 +0000
(10:32 +0800)
committer
Jeremy Kerr
<jk@ozlabs.org>
Thu, 26 Sep 2013 07:13:20 +0000
(15:13 +0800)
We're modifying dir rather than cur (the local copy of dir), so the
caller-provided (const!) string is no longer const.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
lib/system/system.c
patch
|
blob
|
history
diff --git
a/lib/system/system.c
b/lib/system/system.c
index c9fe979465239d589d5db35de8c57ed75643949e..0253ac8778e32242bf055d2a3eadbcede4ba1920 100644
(file)
--- a/
lib/system/system.c
+++ b/
lib/system/system.c
@@
-91,12
+91,12
@@
int pb_rmdir_recursive(const char *base, const char *dir)
cur = talloc_strdup(NULL, dir);
- while (strcmp(base,
di
r)) {
+ while (strcmp(base,
cu
r)) {
- rmdir(
di
r);
+ rmdir(
cu
r);
/* null-terminate at the last slash */
- pos = strrchr(
di
r, '/');
+ pos = strrchr(
cu
r, '/');
if (!pos)
break;