projects
/
mmh
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9e6d913
)
etcpath(): The unchanged argument is the ultimate fall-back.
author
markus schnalke
<meillo@marmaro.de>
Sat, 24 Mar 2012 10:04:47 +0000
(11:04 +0100)
committer
markus schnalke
<meillo@marmaro.de>
Sat, 24 Mar 2012 10:04:47 +0000
(11:04 +0100)
sbr/path.c
patch
|
blob
|
history
diff --git
a/sbr/path.c
b/sbr/path.c
index
27af5b3
..
21796a7
100644
(file)
--- a/
sbr/path.c
+++ b/
sbr/path.c
@@
-18,6
+18,7
@@
** 2) Next, if already absolute pathname, then leave unchanged.
** 3) Next, check in mmh directory.
** 4) Next, check in mmh `etc' directory.
** 2) Next, if already absolute pathname, then leave unchanged.
** 3) Next, check in mmh directory.
** 4) Next, check in mmh `etc' directory.
+** 5) As fall-back, return `file' unchanged.
*/
char *
etcpath(char *file)
*/
char *
etcpath(char *file)
@@
-65,9
+66,11
@@
try_it:
/* Check nmh `etc' directory */
snprintf(epath, sizeof epath, "%s/%s", mhetcdir, file);
/* Check nmh `etc' directory */
snprintf(epath, sizeof epath, "%s/%s", mhetcdir, file);
- return (access(epath, R_OK) != NOTOK ? epath : file);
+ if (access(epath, R_OK) != NOTOK)
+ return epath;
- /* TODO: What is the ultimate fallback? NULL or file? */
+ /* The fall-back */
+ return file;
}
}