summaryrefslogtreecommitdiff
path: root/ncurses/tinfo/obsolete.c
diff options
context:
space:
mode:
Diffstat (limited to 'ncurses/tinfo/obsolete.c')
-rw-r--r--ncurses/tinfo/obsolete.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ncurses/tinfo/obsolete.c b/ncurses/tinfo/obsolete.c
index cc62f18cb3f4..79660b0eab4c 100644
--- a/ncurses/tinfo/obsolete.c
+++ b/ncurses/tinfo/obsolete.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright 2020,2023 Thomas E. Dickey *
+ * Copyright 2020-2024,2025 Thomas E. Dickey *
* Copyright 2013-2014,2016 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@@ -37,7 +37,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: obsolete.c,v 1.11 2023/10/21 15:38:47 tom Exp $")
+MODULE_ID("$Id: obsolete.c,v 1.13 2025/02/20 01:12:11 tom Exp $")
/*
* Obsolete entrypoint retained for binary compatibility.
@@ -64,11 +64,11 @@ _nc_set_buffer(FILE *ofp, int buffered)
NCURSES_EXPORT(char *)
_nc_strdup(const char *s)
{
- char *result = 0;
- if (s != 0) {
+ char *result = NULL;
+ if (s != NULL) {
size_t need = strlen(s);
result = malloc(need + 1);
- if (result != 0) {
+ if (result != NULL) {
_nc_STRCPY(result, s, need);
}
}
@@ -126,7 +126,7 @@ _nc_conv_to_utf8(unsigned char *target, unsigned source, unsigned limit)
rc = 0;
}
- if (target != 0) {
+ if (target != NULL) {
switch (rc) {
case 1:
target[0] = CH(0);
@@ -225,7 +225,7 @@ _nc_conv_to_utf32(unsigned *target, const char *source, unsigned limit)
}
}
- if (target != 0) {
+ if (target != NULL) {
int shift = 0;
*target = 0;
for (j = 1; j < rc; j++) {