summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2022-10-06 13:18:44 +0300
committerToomas Soome <tsoome@me.com>2022-10-07 16:09:30 +0300
commitbdf9be201fbb95afc4f1d45b03d66d6f0f96c25f (patch)
treec4a82b95abaa4a542dfee3788b64ca52820e11a2
parent430fb0518974971393f591123b410c866df1855a (diff)
downloadillumos-joyent-bdf9be201fbb95afc4f1d45b03d66d6f0f96c25f.tar.gz
15052 libc: unused label
Reviewed by: Andy Fiddaman <illumos@fiddaman.net> Reviewed by: Marcel Telka <marcel@telka.sk> Approved by: Gordon Ross <gordon.w.ross@gmail.com>
-rw-r--r--usr/src/lib/libc/port/gen/getutx.c1
-rw-r--r--usr/src/lib/libc/port/locale/collate.c18
2 files changed, 6 insertions, 13 deletions
diff --git a/usr/src/lib/libc/port/gen/getutx.c b/usr/src/lib/libc/port/gen/getutx.c
index 5ccd88e55d..71b8364600 100644
--- a/usr/src/lib/libc/port/gen/getutx.c
+++ b/usr/src/lib/libc/port/gen/getutx.c
@@ -877,7 +877,6 @@ updwtmpx(const char *filex, struct utmpx *utx)
utmpx_api2frec(utx, &futx);
(void) write(wfdx, &futx, sizeof (futx));
-done:
(void) close(wfdx);
}
diff --git a/usr/src/lib/libc/port/locale/collate.c b/usr/src/lib/libc/port/locale/collate.c
index a8d7bf60d5..cf480c913b 100644
--- a/usr/src/lib/libc/port/locale/collate.c
+++ b/usr/src/lib/libc/port/locale/collate.c
@@ -380,7 +380,7 @@ _collate_wxfrm(const struct lc_collate *lcc, const wchar_t *src, wchar_t *xf,
wchar_t *tr = NULL;
int direc;
int pass;
- const int32_t *state;
+ const int32_t *state;
size_t want = 0;
size_t need = 0;
int ndir = lcc->lc_directive_count;
@@ -470,14 +470,11 @@ _collate_wxfrm(const struct lc_collate *lcc, const wchar_t *src, wchar_t *xf,
}
}
-end:
- if (tr)
- free(tr);
+ free(tr);
return (need);
fail:
- if (tr)
- free(tr);
+ free(tr);
return ((size_t)(-1));
}
@@ -531,7 +528,7 @@ _collate_sxfrm(const wchar_t *src, char *xf, size_t room, locale_t loc)
wchar_t *tr = NULL;
int direc;
int pass;
- const int32_t *state;
+ const int32_t *state;
size_t want = 0;
size_t need = 0;
int b;
@@ -640,13 +637,10 @@ _collate_sxfrm(const wchar_t *src, char *xf, size_t room, locale_t loc)
}
}
-end:
- if (tr)
- free(tr);
+ free(tr);
return (need);
fail:
- if (tr)
- free(tr);
+ free(tr);
return ((size_t)(-1));
}