projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed isprefix() and replaced it with strncmp().
[mmh]
/
uip
/
rmf.c
diff --git
a/uip/rmf.c
b/uip/rmf.c
index
f214f59
..
48a555e
100644
(file)
--- a/
uip/rmf.c
+++ b/
uip/rmf.c
@@
-139,8
+139,8
@@
rmf(char *folder)
break; /* fall otherwise */
case NOTOK:
break; /* fall otherwise */
case NOTOK:
- snprintf(cur, sizeof(cur), "atr-%s-%s",
- current, toabsdir(folder));
+ snprintf(cur, sizeof(cur), "atr-%s-%s", seq_cur,
+ toabsdir(folder));
if (!context_del(cur)) {
printf("[+%s de-referenced]\n", folder);
return OK;
if (!context_del(cur)) {
printf("[+%s de-referenced]\n", folder);
return OK;
@@
-241,7
+241,7
@@
rma(char *folder)
** "atr-something-folderpath", and remove them.
*/
for (np = m_defs, pp = NULL; np; np = np->n_next) {
** "atr-something-folderpath", and remove them.
*/
for (np = m_defs, pp = NULL; np; np = np->n_next) {
- if (isprefix("atr-", np->n_name) &&
+ if (strncmp(np->n_name, "atr-", alen)==0 &&
(j = strlen(np->n_name) - plen) > alen &&
*(np->n_name + j) == '-' &&
strcmp(cp, np->n_name + j + 1) == 0) {
(j = strlen(np->n_name) - plen) > alen &&
*(np->n_name + j) == '-' &&
strcmp(cp, np->n_name + j + 1) == 0) {