*/
extern const char* process_prefix_flag (const char* short_opt, int argc, char **argv)
{
- /*
- * Parse the command line options.
- */
- int i;
- const char *prefix = NULL, *val;
+ const char *prefix = NULL;
+
+ for (int i = 0; i < argc; i++) {
+ const char *val;
- for (i = 0; i < argc; i++) {
val = NULL;
if ( streq(argv[i], "--prefix")
|| ((strncmp (argv[i], "--prefix=", 9) == 0)
*/
extern void process_root_flag (const char* short_opt, int argc, char **argv)
{
- /*
- * Parse the command line options.
- */
- int i;
- const char *newroot = NULL, *val;
+ const char *newroot = NULL;
+
+ for (int i = 0; i < argc; i++) {
+ const char *val;
- for (i = 0; i < argc; i++) {
val = NULL;
if ( streq(argv[i], "--root")
|| ((strncmp (argv[i], "--root=", 7) == 0)
char buf[BUFSIZ];
char *name;
char *newpwd;
- char *cp;
const char *salt;
#ifdef USE_PAM
* present.
*/
while (fgets (buf, sizeof buf, stdin) != NULL) {
+ char *cp;
+
line++;
if (stpsep(buf, "\n") == NULL) {
if (feof (stdin) == 0) {