aboutsummaryrefslogtreecommitdiff
path: root/src/core/strs.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2025-10-11 06:50:54 -0700
committerGarrett D'Amore <garrett@damore.org>2025-10-11 06:50:54 -0700
commit2f24a1b1c93b8c45dce391ed0439131f9ad8cf28 (patch)
tree51065064cec7f35b900291fb2a101b7dbe3b6826 /src/core/strs.c
parentb98e03b26bfc593326bd7c1d56fd69626f6a93cb (diff)
downloadnng-2f24a1b1c93b8c45dce391ed0439131f9ad8cf28.tar.gz
nng-2f24a1b1c93b8c45dce391ed0439131f9ad8cf28.tar.bz2
nng-2f24a1b1c93b8c45dce391ed0439131f9ad8cf28.zip
fix includes for core
Diffstat (limited to 'src/core/strs.c')
-rw-r--r--src/core/strs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/strs.c b/src/core/strs.c
index 3f51e59a..ad73951b 100644
--- a/src/core/strs.c
+++ b/src/core/strs.c
@@ -14,7 +14,8 @@
#include <stdlib.h>
#include <string.h>
-#include "core/nng_impl.h"
+#include "defs.h"
+#include "strs.h"
// This file contains implementation of utility functions that are not
// part of standard C99. (C11 has added some things here, but we cannot
@@ -28,7 +29,7 @@
char *
nni_strdup(const char *src)
{
- char * dst;
+ char *dst;
size_t len = strlen(src) + 1;
if ((dst = nni_alloc(len)) != NULL) {
@@ -157,7 +158,7 @@ nni_asprintf(char **sp, const char *fmt, ...)
{
va_list ap;
size_t len;
- char * s;
+ char *s;
va_start(ap, fmt);
len = vsnprintf(NULL, 0, fmt, ap);