From 93d9282d0fdada50a72dc80a59e415cfd8290b3f Mon Sep 17 00:00:00 2001 From: William Kent Date: Mon, 26 Nov 2018 21:09:21 -0500 Subject: [PATCH] Remove now-redundant hidden-liinkage attributes --- src/libnv/libsbuf.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/libnv/libsbuf.c b/src/libnv/libsbuf.c index 3f49494..43283cf 100644 --- a/src/libnv/libsbuf.c +++ b/src/libnv/libsbuf.c @@ -12,7 +12,6 @@ struct sbuf { int s_flags; /* flags, unused */ }; -__attribute__((visibility("hidden"))) struct sbuf *sbuf_new_auto(void) { struct sbuf *sb = calloc(1, sizeof(*sb)); sb->s_buf = malloc(1024); @@ -21,7 +20,6 @@ struct sbuf *sbuf_new_auto(void) { return sb; } -__attribute__((visibility("hidden"))) void sbuf_clear(struct sbuf *sb) { free(sb->s_buf); sb->s_buf = malloc(1024); @@ -29,13 +27,11 @@ void sbuf_clear(struct sbuf *sb) { sb->s_len = 0; } -__attribute__((visibility("hidden"))) int sbuf_setpos(struct sbuf *sb, int pos) { // Unimplemented. return sb->s_len; } -__attribute__((visibility("hidden"))) int sbuf_bcat(struct sbuf *sb, const void *ptr, size_t len) { if ((sb->s_len + len) > sb->s_size) { sb->s_size *= 2; @@ -47,7 +43,6 @@ int sbuf_bcat(struct sbuf *sb, const void *ptr, size_t len) { return sb->s_len; } -__attribute__((visibility("hidden"))) int sbuf_bcpy(struct sbuf *sb, const void *ptr, size_t len) { if (len > sb->s_size) { sb->s_size *= 2; @@ -59,17 +54,14 @@ int sbuf_bcpy(struct sbuf *sb, const void *ptr, size_t len) { return sb->s_len; } -__attribute__((visibility("hidden"))) int sbuf_cat(struct sbuf *sb, const char *str) { return sbuf_bcat(sb, str, (int)strlen(str) * sizeof(char)); } -__attribute__((visibility("hidden"))) int sbuf_cpy(struct sbuf *sb, const char *str) { return sbuf_bcpy(sb, str, (int)strlen(str) * sizeof(char)); } -__attribute__((visibility("hidden"))) int sbuf_vprintf(struct sbuf *sb, const char *fmt, va_list ap) { char *str; vasprintf(&str, fmt, ap); int ret = sbuf_cat(sb, str); @@ -77,7 +69,6 @@ int sbuf_vprintf(struct sbuf *sb, const char *fmt, va_list ap) { return ret; } -__attribute__((visibility("hidden"))) int sbuf_printf(struct sbuf *sb, const char *fmt, ...) { va_list ap; va_start(ap, fmt); @@ -86,46 +77,38 @@ int sbuf_printf(struct sbuf *sb, const char *fmt, ...) { return ret; } -__attribute__((visibility("hidden"))) int sbuf_putc(struct sbuf *sb, int c) { return sbuf_bcat(sb, &c, sizeof(int)); } -__attribute__((visibility("hidden"))) int sbuf_trim(struct sbuf *sb) { // Don't know what this does. return 0; } -__attribute__((visibility("hidden"))) int sbuf_overflowed(struct sbuf *sb) { // Don't know what this does. return 0; } -__attribute__((visibility("hidden"))) void sbuf_finish(struct sbuf *sb) { // Don't know what this does. } -__attribute__((visibility("hidden"))) char *sbuf_data(struct sbuf *sb) { bzero(sb->s_buf + sb->s_len, sb->s_size - sb->s_len); return sb->s_buf; } -__attribute__((visibility("hidden"))) int sbuf_len(struct sbuf *sb) { return sb->s_len; } -__attribute__((visibility("hidden"))) int sbuf_done(struct sbuf *sb) { // Don't know what this does. return 0; } -__attribute__((visibility("hidden"))) void sbuf_delete(struct sbuf *sb) { free(sb->s_buf); free(sb);