It never actually changes, but this isn't clear from the typing.
/*----- Static variables --------------------------------------------------*/
/*----- Static variables --------------------------------------------------*/
-static struct elt rootnode = { 0, 0, 0 }; /* Root of the list */
+static const struct elt rootnode = { 0, 0, 0 }; /* Root of the list */
static struct elt *sp; /* Stack pointer for list */
static dstr d = DSTR_INIT; /* Current path string */
static struct elt *sp; /* Stack pointer for list */
static dstr d = DSTR_INIT; /* Current path string */
/* --- Initialize stack pointer and path string --- */
/* --- Initialize stack pointer and path string --- */
+ sp = (/*unconst*/ struct elt *)&rootnode;
dstr_destroy(&d);
/* --- Try to find the current directory --- */
dstr_destroy(&d);
/* --- Try to find the current directory --- */