1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

Fix newlines in errx(3) calls.

This commit is contained in:
Jonas 'Sortie' Termansen 2016-10-03 16:00:00 +02:00
parent 28fec736dc
commit 057bd25898
2 changed files with 5 additions and 5 deletions

View file

@ -51,7 +51,7 @@ bool get_option_variable(const char* option, const char** varptr,
if ( arg[option_len] != '\0' )
return false;
if ( *ip + 1 == argc )
errx(1, "expected operand after `%s'\n", option);
errx(1, "expected operand after `%s'", option);
*varptr = argv[++*ip];
argv[*ip] = NULL;
return true;
@ -128,7 +128,7 @@ int main(int argc, char* argv[])
case 't': GET_SHORT_OPTION_VARIABLE('t', &type); arg = "t"; break;
case 'v': flag_volatile = true; break;
default:
errx(1, "unknown option -- '%c'\n", c);
errx(1, "unknown option -- '%c'", c);
}
}
else if ( !strcmp(arg, "--const") )
@ -172,7 +172,7 @@ int main(int argc, char* argv[])
else if ( GET_OPTION_VARIABLE("--output", &output) ) { }
else if ( GET_OPTION_VARIABLE("--type", &type) ) { }
else
errx(1, "unknown option: %s\n", arg);
errx(1, "unknown option: %s", arg);
}
compact_arguments(&argc, &argv);

View file

@ -42,11 +42,11 @@ int main(int argc, char* argv[])
while ( (c = *++arg) ) switch ( c )
{
default:
errx(1, "unknown option -- '%c'\n", c);
errx(1, "unknown option -- '%c'", c);
}
}
else
errx(1, "unknown option: %s\n", arg);
errx(1, "unknown option: %s", arg);
}
size_t size = 32;
char* buffer = (char*) malloc(size);