summaryrefslogtreecommitdiff
path: root/src/mate-calc-cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mate-calc-cmd.c')
-rw-r--r--src/mate-calc-cmd.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mate-calc-cmd.c b/src/mate-calc-cmd.c
index cf8db3d..842eab5 100644
--- a/src/mate-calc-cmd.c
+++ b/src/mate-calc-cmd.c
@@ -49,7 +49,6 @@ solve(const char *equation)
mp_clear(&z);
}
-
/* Adjust user input equation string before solving it. */
static void
str_adjust(char *str)
@@ -67,10 +66,9 @@ str_adjust(char *str)
}
int
-main(int argc, char **argv)
+main(void)
{
char *equation, *line;
- size_t nbytes = MAXLINE;
/* Seed random number generator. */
srand48((long) time((time_t *) 0));
@@ -82,7 +80,7 @@ main(int argc, char **argv)
equation = (char *) malloc(MAXLINE * sizeof(char));
while (1) {
printf("> ");
- line = fgets(equation, nbytes, stdin);
+ line = fgets(equation, MAXLINE, stdin);
if (line != NULL)
str_adjust(equation);