Univention Bugzilla – Attachment 4399 Details for
Bug 27315
Namespace pollution / static
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Make functions static
0003-Ticket-2012050221003422-Make-functions-static.patch (text/plain), 3.75 KB, created by
Philipp Hahn
on 2012-05-29 14:31 CEST
(
hide
)
Description:
Make functions static
Filename:
MIME Type:
Creator:
Philipp Hahn
Created:
2012-05-29 14:31 CEST
Size:
3.75 KB
patch
obsolete
>From ac49056f1893875461fa11f837e01b0073cad292 Mon Sep 17 00:00:00 2001 >Message-Id: <ac49056f1893875461fa11f837e01b0073cad292.1338294098.git.hahn@univention.de> >In-Reply-To: <ccdba1cd10f4c19ed93a761f31af2c71ef47d86d.1338294098.git.hahn@univention.de> >References: <ccdba1cd10f4c19ed93a761f31af2c71ef47d86d.1338294098.git.hahn@univention.de> >From: Philipp Hahn <hahn@univention.de> >Date: Tue, 29 May 2012 12:45:23 +0200 >Subject: [PATCH 3/4] Ticket #2012050221003422: Make functions static >Organization: Univention GmbH, Bremen, Germany > >Reduce name space pollution by making more functions static. >--- > .../univention-directory-listener/src/dump.c | 2 +- > .../univention-directory-listener/src/main.c | 6 +++--- > .../univention-directory-listener/src/verify.c | 10 +++++----- > 3 files changed, 9 insertions(+), 9 deletions(-) > >diff --git a/branches/ucs-3.0/ucs/management/univention-directory-listener/src/dump.c b/branches/ucs-3.0/ucs/management/univention-directory-listener/src/dump.c >index d4797fa..8157c9b 100644 >--- a/branches/ucs-3.0/ucs/management/univention-directory-listener/src/dump.c >+++ b/branches/ucs-3.0/ucs/management/univention-directory-listener/src/dump.c >@@ -51,7 +51,7 @@ char *cache_dir = "/var/lib/univention-directory-listener"; > > int INIT_ONLY=0; > >-void usage(void) >+static void usage(void) > { > fprintf(stderr, "Usage: univention-directory-listener-dump [options]\n"); > fprintf(stderr, "Options:\n"); >diff --git a/branches/ucs-3.0/ucs/management/univention-directory-listener/src/main.c b/branches/ucs-3.0/ucs/management/univention-directory-listener/src/main.c >index baa7905..2ee15a9 100644 >--- a/branches/ucs-3.0/ucs/management/univention-directory-listener/src/main.c >+++ b/branches/ucs-3.0/ucs/management/univention-directory-listener/src/main.c >@@ -243,7 +243,7 @@ static void convert_cookie(void) > #endif > } > >-void purge_cache(const char *cache_dir) >+static void purge_cache(const char *cache_dir) > { > DIR* dir; > struct dirent *dirent; >@@ -272,7 +272,7 @@ void purge_cache(const char *cache_dir) > free(dirname); > } > >-void prepare_cache(const char *cache_dir) >+static void prepare_cache(const char *cache_dir) > { > char *dirname; > struct stat stbuf; >@@ -284,7 +284,7 @@ void prepare_cache(const char *cache_dir) > free(dirname); > } > >-int do_connection(univention_ldap_parameters_t *lp) >+static int do_connection(univention_ldap_parameters_t *lp) > { > LDAPMessage *res; > struct timeval timeout; >diff --git a/branches/ucs-3.0/ucs/management/univention-directory-listener/src/verify.c b/branches/ucs-3.0/ucs/management/univention-directory-listener/src/verify.c >index 7a27d1f..cd15462 100644 >--- a/branches/ucs-3.0/ucs/management/univention-directory-listener/src/verify.c >+++ b/branches/ucs-3.0/ucs/management/univention-directory-listener/src/verify.c >@@ -55,17 +55,17 @@ struct dn { > char *dn; > struct dn *next; > }; >-struct dn *dns = NULL; >+static struct dn *dns = NULL; > > >-void add_dn(char *dn) { >+static void add_dn(char *dn) { > struct dn *new = malloc(sizeof(struct dn)); > new->dn = strdup(dn); > new->next = dns; > dns = new; > } > >-int has_dn(char *dn) { >+static int has_dn(char *dn) { > struct dn *cur; > for (cur = dns; cur != NULL; cur=cur->next) { > if (strcmp(dn, cur->dn) == 0) { >@@ -75,7 +75,7 @@ int has_dn(char *dn) { > return 0; > } > >-void compare_entries(char *dn, CacheEntry *entry, LDAP *ld, LDAPMessage *ldap_entry) >+static void compare_entries(char *dn, CacheEntry *entry, LDAP *ld, LDAPMessage *ldap_entry) > { > CacheEntry lentry; > char **changes; >@@ -122,7 +122,7 @@ void compare_entries(char *dn, CacheEntry *entry, LDAP *ld, LDAPMessage *ldap_en > free(changes); > } > >-void usage(void) >+static void usage(void) > { > fprintf(stderr, "Usage: univention-directory-listener-verify [options]\n"); > fprintf(stderr, "Options:\n"); >-- >1.7.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 27315
: 4399