DRAFT lib: unsetenv: Fix signature.

* lib/posix/unsetenv.c (unsetenv): Return int.
* include/stdlib.h (unsetenv): Update prototype.
This commit is contained in:
Jan (janneke) Nieuwenhuizen 2022-11-01 21:51:31 +01:00
parent a76d1f2c84
commit 14d0eecc31
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
2 changed files with 4 additions and 3 deletions

View File

@ -46,7 +46,7 @@ void exit (int status);
void free (void *ptr);
char *getenv (char const *s);
int setenv (char const *s, char const *v, int overwrite_p);
void unsetenv (char const *name);
int unsetenv (char const *name);
void *malloc (size_t);
void qsort (void *base, size_t nmemb, size_t size, int (*compar) (void const *, void const *));
int rand (void);

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2018,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -22,7 +22,7 @@
#include <string.h>
#include <unistd.h>
void
int
unsetenv (char const *name)
{
int length = strlen (name);
@ -38,4 +38,5 @@ unsetenv (char const *name)
}
p++;
}
return 0;
}