summaryrefslogtreecommitdiffstats
path: root/mount/sundries.c
diff options
context:
space:
mode:
Diffstat (limited to 'mount/sundries.c')
-rw-r--r--mount/sundries.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/mount/sundries.c b/mount/sundries.c
index af5bb884c..2118ce285 100644
--- a/mount/sundries.c
+++ b/mount/sundries.c
@@ -32,6 +32,17 @@ xmalloc (size_t size) {
return t;
}
+void *
+xrealloc (void *p, size_t size) {
+ void *t;
+
+ t = realloc(p, size);
+ if (t == NULL)
+ die (EX_SYSERR, _("not enough memory"));
+
+ return t;
+}
+
char *
xstrdup (const char *s) {
char *t;
@@ -278,11 +289,12 @@ canonicalize (const char *path) {
if (path == NULL)
return NULL;
+#if 1
if (streq(path, "none") ||
streq(path, "proc") ||
streq(path, "devpts"))
return xstrdup(path);
-
+#endif
if (myrealpath (path, canonical, PATH_MAX+1))
return xstrdup(canonical);