[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/2] Eschew STEP macro in favour of const int
From: |
John Darrington |
Subject: |
[PATCH 2/2] Eschew STEP macro in favour of const int |
Date: |
Fri, 21 Feb 2020 17:38:38 +0100 |
---
src/pk-editor.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/pk-editor.c b/src/pk-editor.c
index a889e1b1..79232ae0 100644
--- a/src/pk-editor.c
+++ b/src/pk-editor.c
@@ -84,7 +84,7 @@ pk_cmd_editor (int argc, struct pk_cmd_arg argv[], uint64_t
uflags)
it. */
if ((f = fopen (tmpfile, "r")) != NULL)
{
-#define STEP 128
+ const int STEP = 128;
char *newline = xmalloc (STEP);
size_t size, i = 0;
int c;
@@ -102,7 +102,6 @@ pk_cmd_editor (int argc, struct pk_cmd_arg argv[], uint64_t
uflags)
newline[i] = c;
}
newline[i] = '\0';
-#undef STEP
fclose (f);
if (newline && *newline != '\0')
--
2.20.1