Skip to content

Commit

Permalink
Add lots of static modifiers
Browse files Browse the repository at this point in the history
The resulting binary will be slightly smaller.

   text	   data	    bss	    dec	    hex	filename
  26277	   1544	  34188	  62009	   f239	dvtm-before
  25739	   1536	  34188	  61463	   f017	dvtm-after
  • Loading branch information
martanne committed Sep 18, 2008
1 parent c25c39b commit a3db63d
Show file tree
Hide file tree
Showing 8 changed files with 113 additions and 113 deletions.
2 changes: 1 addition & 1 deletion bstack.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
void
static void
bstack(void) {
unsigned int i, m, n, nx, ny, nw, nh, mh, tw;
Client *c;
Expand Down
12 changes: 6 additions & 6 deletions cmdfifo.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
int cmdfd = -1;
unsigned short int client_id = 0;
const char *cmdpath = NULL;
static int cmdfd = -1;
static unsigned short int client_id = 0;
static const char *cmdpath = NULL;

/* glibc has a non-standard realpath(3) implementation which allocates
* the destination buffer, other C libraries may have a broken implementation
Expand All @@ -14,7 +14,7 @@ const char *cmdpath = NULL;
# endif
#endif

char *get_realpath(const char *path) {
static char *get_realpath(const char *path) {
#ifdef __GLIBC__
return realpath(path, NULL);
#else
Expand All @@ -23,7 +23,7 @@ char *get_realpath(const char *path) {
#endif
}

Cmd *
static Cmd *
get_cmd_by_name(const char *name) {
for (int i = 0; i < countof(commands); i++) {
if (!strcmp(name, commands[i].name))
Expand All @@ -32,7 +32,7 @@ get_cmd_by_name(const char *name) {
return NULL;
}

void
static void
handle_cmdfifo() {
int r;
char *p, *s, cmdbuf[512], c;
Expand Down
Loading

0 comments on commit a3db63d

Please sign in to comment.