Commit ae87487b authored by Randy Dunlap's avatar Randy Dunlap Committed by Greg Kroah-Hartman

[PATCH] janitor: don't init statics to 0

From: Leann Ogasawara <ogasawara@osdl.org>

Uninitialize static variables initialized to 0 so they are pushed to the
.bss instead of .data.
parent 53ef8f80
......@@ -42,7 +42,7 @@
#define IDX7 27333
#define IDX8 3000
static int mode = 0;
static int mode;
static char *xbuf;
static char *tvmem;
......
......@@ -766,8 +766,8 @@ EXPORT_SYMBOL(cpufreq_set_policy);
* per-CPU loops_per_jiffy value wherever possible.
*/
#ifndef CONFIG_SMP
static unsigned long l_p_j_ref = 0;
static unsigned int l_p_j_ref_freq = 0;
static unsigned long l_p_j_ref;
static unsigned int l_p_j_ref_freq;
static inline void adjust_jiffies(unsigned long val, struct cpufreq_freqs *ci)
{
......
......@@ -347,7 +347,7 @@ void __release_region(struct resource *parent, unsigned long start, unsigned lon
#define MAXRESERVE 4
static int __init reserve_setup(char *str)
{
static int reserved = 0;
static int reserved;
static struct resource reserve[MAXRESERVE];
for (;;) {
......
......@@ -92,18 +92,18 @@ spinlock_t suspend_pagedir_lock __nosavedata = SPIN_LOCK_UNLOCKED;
/* Variables to be preserved over suspend */
static int new_loglevel = 7;
static int orig_loglevel = 0;
static int orig_loglevel;
static int orig_fgconsole, orig_kmsg;
static int pagedir_order_check;
static int nr_copy_pages_check;
static int resume_status = 0;
static int resume_status;
static char resume_file[256] = ""; /* For resume= kernel option */
static dev_t resume_device;
/* Local variables that should not be affected by save */
unsigned int nr_copy_pages __nosavedata = 0;
static int pm_suspend_state = 0;
static int pm_suspend_state;
/* Suspend pagedir is allocated before final copy, therefore it
must be freed after resume
......
......@@ -585,7 +585,7 @@ static ctl_table kern_table[] = {
/* Constants for minimum and maximum testing in vm_table.
We use these as one-element integer vectors. */
static int zero = 0;
static int zero;
static int one_hundred = 100;
......
......@@ -228,7 +228,7 @@ static void send_bits(
*/
static void tr_static_init(void)
{
static int static_init_done = 0;
static int static_init_done;
int n; /* iterates over tree elements */
int bits; /* bit counter */
int length; /* length value */
......
......@@ -296,7 +296,7 @@ static swp_entry_t *shmem_swp_alloc(struct shmem_inode_info *info, unsigned long
struct shmem_sb_info *sbinfo = SHMEM_SB(inode->i_sb);
struct page *page = NULL;
swp_entry_t *entry;
static const swp_entry_t unswapped = {0};
static const swp_entry_t unswapped;
if (sgp != SGP_WRITE &&
((loff_t) index << PAGE_CACHE_SHIFT) >= i_size_read(inode))
......
......@@ -1222,7 +1222,7 @@ asmlinkage long sys_swapon(const char __user * specialfile, int swap_flags)
unsigned int type;
int i, prev;
int error;
static int least_priority = 0;
static int least_priority;
union swap_header *swap_header = 0;
int swap_header_version;
int nr_good_pages = 0;
......
......@@ -56,7 +56,7 @@ GdkColor color;
GtkTreeStore *tree1, *tree2, *tree;
GtkTreeModel *model1, *model2;
static GtkTreeIter *parents[256] = { 0 };
static GtkTreeIter *parents[256];
static gint indent;
static struct menu *current; // current node for SINGLE view
......@@ -110,7 +110,7 @@ const char *dbg_print_stype(int val)
const char *dbg_print_flags(int val)
{
static char buf[256] = { 0 };
static char buf[256];
bzero(buf, 256);
......@@ -577,7 +577,7 @@ void
on_window1_size_request(GtkWidget * widget,
GtkRequisition * requisition, gpointer user_data)
{
static gint old_h = 0;
static gint old_h;
gint w, h;
if (widget->window == NULL)
......@@ -1184,7 +1184,7 @@ on_treeview1_button_press_event(GtkWidget * widget,
/* Fill a row of strings */
static gchar **fill_row(struct menu *menu)
{
static gchar *row[COL_NUMBER] = { 0 };
static gchar *row[COL_NUMBER];
struct symbol *sym = menu->sym;
const char *def;
int stype;
......
......@@ -85,7 +85,7 @@ static char buf[4096], *bufptr = buf;
static char input_buf[4096];
static char filename[PATH_MAX+1] = ".config";
static char *args[1024], **argptr = args;
static int indent = 0;
static int indent;
static struct termios ios_org;
static int rows, cols;
static struct menu *current_menu;
......
......@@ -27,8 +27,8 @@ static void print_line (WINDOW * win, int row, int width);
static char *get_line (void);
static void print_position (WINDOW * win, int height, int width);
static int hscroll = 0, fd, file_size, bytes_read;
static int begin_reached = 1, end_reached = 0, page_length;
static int hscroll, fd, file_size, bytes_read;
static int begin_reached = 1, end_reached, page_length;
static char *buf, *page;
/*
......
......@@ -73,7 +73,7 @@ static unsigned int logo_width;
static unsigned int logo_height;
static struct color **logo_data;
static struct color logo_clut[MAX_LINUX_LOGO_COLORS];
static unsigned int logo_clutsize = 0;
static unsigned int logo_clutsize;
static void die(const char *fmt, ...)
__attribute__ ((noreturn)) __attribute ((format (printf, 1, 2)));
......@@ -259,7 +259,7 @@ static void write_footer(void)
fclose(out);
}
static int write_hex_cnt = 0;
static int write_hex_cnt;
static void write_hex(unsigned char byte)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment