return ret;
}
-/**
- * Cut trailing newline.
- *
- * \param buf The string to be chopped.
- *
- * Replace the last character in \p buf by zero if it is equal to
- * the newline character.
- */
-void chop(char *buf)
-{
- int n = strlen(buf);
-
- if (!n)
- return;
- if (buf[n - 1] == '\n')
- buf[n - 1] = '\0';
-}
-
/**
* Get the logname of the current user.
*