nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit b170298371e8c19f9c13b8e82cbdb3953a486e04
parent ddbd15f7fddd92ac4758b2bfc01883bd9da62bcb
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date:   Sun, 25 Aug 2024 18:37:13 +0530

Use string literal for NUL

Diffstat:
Msrc/nnn.c | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/nnn.c b/src/nnn.c @@ -194,8 +194,6 @@ #define PROMPT ">>> " #undef NEWLINE #define NEWLINE "\n" -#undef NUL -#define NUL "\0" #define REGEX_MAX 48 #define ENTRY_INCR 64 /* Number of dir 'entry' structures to allocate per shot */ #define NAMEBUF_INCR 0x800 /* 64 dir entries at once, avg. 32 chars per file name = 64*32B = 2KB */ @@ -9054,7 +9052,7 @@ int main(int argc, char *argv[]) if (g_state.picker) { if (selbufpos) { fd = selpath ? open(selpath, O_WRONLY | O_CREAT | O_TRUNC, 0600) : STDOUT_FILENO; - if ((fd == -1) || (seltofile(fd, NULL, sepnul ? NUL : NEWLINE) != (size_t)(selbufpos))) + if ((fd == -1) || (seltofile(fd, NULL, sepnul ? "\0" : NEWLINE) != (size_t)(selbufpos))) xerror(); if (fd > 1)