Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove superfluous extern variable declarations #1023

Merged
merged 1 commit into from
May 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions etc/cnid_dbd/cmd_dbd.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ typedef unsigned int dbd_flags_t;

extern volatile sig_atomic_t alarmed;

extern void dbd_log(enum logtype lt, char *fmt, ...);
extern int cmd_dbd_scanvol(struct vol *vol, dbd_flags_t flags);
void dbd_log(enum logtype lt, char *fmt, ...);
int cmd_dbd_scanvol(struct vol *vol, dbd_flags_t flags);

#endif /* CMD_DBD_H */
9 changes: 4 additions & 5 deletions etc/cnid_dbd/comm.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
#include <atalk/cnid_bdb_private.h>


extern int comm_init (struct db_param *, int, int);
extern int comm_rcv (struct cnid_dbd_rqst *, time_t, const sigset_t *, time_t *);
extern int comm_snd (struct cnid_dbd_rply *);
extern int comm_nbe (void);
int comm_init (struct db_param *, int, int);
int comm_rcv (struct cnid_dbd_rqst *, time_t, const sigset_t *, time_t *);
int comm_snd (struct cnid_dbd_rply *);
int comm_nbe (void);

#endif /* CNID_DBD_COMM_H */

2 changes: 1 addition & 1 deletion etc/cnid_dbd/db_param.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct db_param {
int max_vols;
};

extern struct db_param *db_param_read (char *);
struct db_param *db_param_read (char *);

#endif /* CNID_DBD_DB_PARAM_H */

24 changes: 12 additions & 12 deletions etc/cnid_dbd/dbd.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@

#include "dbif.h"

extern int add_cnid(DBD *dbd, struct cnid_dbd_rqst *rqst, struct cnid_dbd_rply *rply);
extern int get_cnid(DBD *dbd, struct cnid_dbd_rply *rply);
int add_cnid(DBD *dbd, struct cnid_dbd_rqst *rqst, struct cnid_dbd_rply *rply);
int get_cnid(DBD *dbd, struct cnid_dbd_rply *rply);

extern int dbd_add(DBD *dbd, struct cnid_dbd_rqst *, struct cnid_dbd_rply *);
extern int dbd_lookup(DBD *dbd, struct cnid_dbd_rqst *, struct cnid_dbd_rply *);
extern int dbd_get(DBD *dbd, struct cnid_dbd_rqst *, struct cnid_dbd_rply *);
extern int dbd_resolve(DBD *dbd, struct cnid_dbd_rqst *, struct cnid_dbd_rply *);
extern int dbd_update(DBD *dbd, struct cnid_dbd_rqst *, struct cnid_dbd_rply *);
extern int dbd_delete(DBD *dbd, struct cnid_dbd_rqst *, struct cnid_dbd_rply *, int idx);
extern int dbd_getstamp(DBD *dbd, struct cnid_dbd_rqst *, struct cnid_dbd_rply *);
extern int dbd_rebuild_add(DBD *dbd, struct cnid_dbd_rqst *, struct cnid_dbd_rply *);
extern int dbd_search(DBD *dbd, struct cnid_dbd_rqst *, struct cnid_dbd_rply *);
extern int dbd_check_indexes(DBD *dbd, char *);
int dbd_add(DBD *dbd, struct cnid_dbd_rqst *, struct cnid_dbd_rply *);
int dbd_lookup(DBD *dbd, struct cnid_dbd_rqst *, struct cnid_dbd_rply *);
int dbd_get(DBD *dbd, struct cnid_dbd_rqst *, struct cnid_dbd_rply *);
int dbd_resolve(DBD *dbd, struct cnid_dbd_rqst *, struct cnid_dbd_rply *);
int dbd_update(DBD *dbd, struct cnid_dbd_rqst *, struct cnid_dbd_rply *);
int dbd_delete(DBD *dbd, struct cnid_dbd_rqst *, struct cnid_dbd_rply *, int idx);
int dbd_getstamp(DBD *dbd, struct cnid_dbd_rqst *, struct cnid_dbd_rply *);
int dbd_rebuild_add(DBD *dbd, struct cnid_dbd_rqst *, struct cnid_dbd_rply *);
int dbd_search(DBD *dbd, struct cnid_dbd_rqst *, struct cnid_dbd_rply *);
int dbd_check_indexes(DBD *dbd, char *);

#endif /* CNID_DBD_DBD_H */
42 changes: 21 additions & 21 deletions etc/cnid_dbd/dbif.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,25 +92,25 @@ typedef struct {
db_table db_table[DBIF_DB_CNT];
} DBD;

extern DBD *dbif_init(const char *envhome, const char *dbname);
extern int dbif_env_open(DBD *dbd, struct db_param *dbp, uint32_t dbenv_oflags);
extern int dbif_open(DBD *dbd, struct db_param *dbp, int reindex);
extern int dbif_close(DBD *dbd);
extern int dbif_env_remove(const char *path);

extern int dbif_get(DBD *, const int, DBT *, DBT *, u_int32_t);
extern int dbif_pget(DBD *, const int, DBT *, DBT *, DBT *, u_int32_t);
extern int dbif_put(DBD *, const int, DBT *, DBT *, u_int32_t);
extern int dbif_del(DBD *, const int, DBT *, u_int32_t);
extern int dbif_count(DBD *, const int, u_int32_t *);
extern int dbif_search(DBD *dbd, DBT *key, char *resbuf);
extern int dbif_copy_rootinfokey(DBD *srcdbd, DBD *destdbd);
extern int dbif_txn_begin(DBD *);
extern int dbif_txn_commit(DBD *);
extern int dbif_txn_abort(DBD *);
extern int dbif_txn_close(DBD *dbd, int ret); /* Switch between commit+abort */
extern int dbif_txn_checkpoint(DBD *, u_int32_t, u_int32_t, u_int32_t);

extern int dbif_dump(DBD *dbd, int dumpindexes);
extern int dbif_idwalk(DBD *dbd, cnid_t *cnid, int close);
DBD *dbif_init(const char *envhome, const char *dbname);
int dbif_env_open(DBD *dbd, struct db_param *dbp, uint32_t dbenv_oflags);
int dbif_open(DBD *dbd, struct db_param *dbp, int reindex);
int dbif_close(DBD *dbd);
int dbif_env_remove(const char *path);

int dbif_get(DBD *, const int, DBT *, DBT *, u_int32_t);
int dbif_pget(DBD *, const int, DBT *, DBT *, DBT *, u_int32_t);
int dbif_put(DBD *, const int, DBT *, DBT *, u_int32_t);
int dbif_del(DBD *, const int, DBT *, u_int32_t);
int dbif_count(DBD *, const int, u_int32_t *);
int dbif_search(DBD *dbd, DBT *key, char *resbuf);
int dbif_copy_rootinfokey(DBD *srcdbd, DBD *destdbd);
int dbif_txn_begin(DBD *);
int dbif_txn_commit(DBD *);
int dbif_txn_abort(DBD *);
int dbif_txn_close(DBD *dbd, int ret); /* Switch between commit+abort */
int dbif_txn_checkpoint(DBD *, u_int32_t, u_int32_t, u_int32_t);

int dbif_dump(DBD *dbd, int dumpindexes);
int dbif_idwalk(DBD *dbd, cnid_t *cnid, int close);
#endif
10 changes: 5 additions & 5 deletions etc/cnid_dbd/pack.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

#include <atalk/cnid_bdb_private.h>

extern unsigned char *pack_cnid_data(struct cnid_dbd_rqst *);
extern int didname(DB *dbp, const DBT *pkey, const DBT *pdata, DBT *skey);
extern int devino(DB *dbp, const DBT *pkey, const DBT *pdata, DBT *skey);
extern int idxname(DB *dbp, const DBT *pkey, const DBT *pdata, DBT *skey);
extern void pack_setvol(const struct vol *vol);
unsigned char *pack_cnid_data(struct cnid_dbd_rqst *);
int didname(DB *dbp, const DBT *pkey, const DBT *pdata, DBT *skey);
int devino(DB *dbp, const DBT *pkey, const DBT *pdata, DBT *skey);
int idxname(DB *dbp, const DBT *pkey, const DBT *pdata, DBT *skey);
void pack_setvol(const struct vol *vol);
#endif /* CNID_DBD_PACK_H */
6 changes: 3 additions & 3 deletions etc/cnid_dbd/usockfd.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
#include <atalk/cnid_bdb_private.h>


extern int usockfd_create (char *, mode_t, int);
extern int tsockfd_create (char *, char *, int);
extern int usockfd_check (int, const sigset_t *);
int usockfd_create (char *, mode_t, int);
int tsockfd_create (char *, char *, int);
int usockfd_check (int, const sigset_t *);

#ifndef OSSH_ALIGNBYTES
#define OSSH_ALIGNBYTES (sizeof(int) - 1)
Expand Down
Loading