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 e7e70a9f48
commit d814b6dbed
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); void free (void *ptr);
char *getenv (char const *s); char *getenv (char const *s);
int setenv (char const *s, char const *v, int overwrite_p); 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 *malloc (size_t);
void qsort (void *base, size_t nmemb, size_t size, int (*compar) (void const *, void const *)); void qsort (void *base, size_t nmemb, size_t size, int (*compar) (void const *, void const *));
int rand (void); int rand (void);

View File

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