more PATH_MAX cleanups

SVN revision: 75520
This commit is contained in:
Mike Blumenkrantz 2012-08-22 07:32:12 +00:00
parent fcea89adb0
commit 2434f5adbe
28 changed files with 42 additions and 42 deletions

View File

@ -436,7 +436,7 @@ _gc_icon(const E_Gadcon_Client_Class *client_class __UNUSED__, Evas *evas)
static const char *
_gc_id_new(const E_Gadcon_Client_Class *client_class)
{
static char buf[PATH_MAX];
static char buf[4096];
snprintf(buf, sizeof(buf), "%s.%d", client_class->name,
eina_list_count(backlight_instances) + 1);

View File

@ -87,7 +87,7 @@ str_file_get(const char *file)
FILE *f = fopen(file, "r");
if (f)
{
char buf[PATH_MAX];
char buf[4096];
char *str = fgets(buf, sizeof(buf), f);
if (str)
{

View File

@ -167,7 +167,7 @@ _gc_icon(const E_Gadcon_Client_Class *client_class __UNUSED__, Evas *evas)
static const char *
_gc_id_new(const E_Gadcon_Client_Class *client_class)
{
static char buf[PATH_MAX];
static char buf[4096];
snprintf(buf, sizeof(buf), "%s.%d", client_class->name,
eina_list_count(battery_config->instances) + 1);

View File

@ -21,7 +21,7 @@
#include "e_mod_main.h"
static E_Module *bluez_mod = NULL;
static char tmpbuf[PATH_MAX]; /* general purpose buffer, just use immediately */
static char tmpbuf[4096]; /* general purpose buffer, just use immediately */
static const char _e_bluez_agent_path[] = "/org/enlightenment/bluez/Agent";
const char _e_bluez_name[] = "bluez";

View File

@ -1421,7 +1421,7 @@ _e_mod_comp_win_shadow_setup(E_Comp_Win *cw)
{
Evas_Object *o;
int ok = 0;
char buf[PATH_MAX];
char buf[4096];
Eina_List *list = NULL, *l;
Match *m;
const char *title = NULL, *name = NULL, *clas = NULL, *role = NULL;

View File

@ -351,7 +351,7 @@ _style_selector(Evas *evas,
EINA_LIST_FOREACH(styles, l, style)
{
E_Demo_Style_Item *ds_it;
char buf[PATH_MAX];
char buf[4096];
ds_it = malloc(sizeof(E_Demo_Style_Item));

View File

@ -219,7 +219,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
EINA_LIST_FREE(borders, str)
{
char buf[PATH_MAX];
char buf[4096];
ob = e_livethumb_add(evas);
e_livethumb_vsize_set(ob, 96, 96);

View File

@ -27,7 +27,7 @@
*/
static E_Module *connman_mod = NULL;
static char tmpbuf[PATH_MAX]; /* general purpose buffer, just use immediately */
static char tmpbuf[4096]; /* general purpose buffer, just use immediately */
const char _e_connman_name[] = "connman";
const char _e_connman_Name[] = "Connection Manager";

View File

@ -391,7 +391,7 @@ _menu_cb_post(void *data, E_Menu *m __UNUSED__)
static void
_cpufreq_set_governor(const char *governor)
{
char buf[PATH_MAX];
char buf[4096];
int ret;
snprintf(buf, sizeof(buf),
@ -419,7 +419,7 @@ _cpufreq_set_governor(const char *governor)
static void
_cpufreq_set_frequency(int frequency)
{
char buf[PATH_MAX];
char buf[4096];
int ret;
#ifdef __FreeBSD__
@ -546,7 +546,7 @@ _cpufreq_cb_sort(const void *item1, const void *item2)
static int
_cpufreq_status_check_available(Status *s)
{
char buf[PATH_MAX];
char buf[4096];
Eina_List *l;
// FIXME: this sssumes all cores accept the same freqs/ might be wrong
#ifdef __FreeBSD__
@ -665,7 +665,7 @@ _cpufreq_status_check_available(Status *s)
static int
_cpufreq_status_check_current(Status *s)
{
char buf[PATH_MAX];
char buf[4096];
int i;
FILE *f;
int ret = 0;

View File

@ -694,16 +694,16 @@ _fetch(Evry_Plugin *plugin, const char *input)
_free_files(p);
strncpy(buf, p->directory, PATH_MAX);
strncpy(buf, p->directory, sizeof(buf));
_folder_item_add(p, p->directory, prio++);
while (strlen(buf) > 1)
{
buf[PATH_MAX - 1] = 0;
buf[PATH_MAX] = 0;
dir = dirname(buf);
_folder_item_add(p, dir, prio++);
strncpy(buf, dir, PATH_MAX);
strncpy(buf, dir, sizeof(buf));
}
p->command = CMD_SHOW_PARENT;

View File

@ -846,7 +846,7 @@ evry_file_url_get(Evry_Item_File *file)
if (!file->path)
return NULL;
memset(dest, 0, PATH_MAX * 3 + 7);
memset(dest, 0, sizeof(dest));
snprintf(dest, 8, "file://");

View File

@ -617,7 +617,7 @@ _e_fwin_icon_popup(void *data)
E_Fwin *fwin = data;
Evas_Object *bg, *edje, *list, *o;
E_Zone *zone;
char buf[PATH_MAX];
char buf[4096];
int x, y, w, h, mw, mh, fx, fy, px, py;
fwin->popup_timer = NULL;
@ -1313,7 +1313,7 @@ _e_fwin_config_set(E_Fwin_Page *page)
static void
_e_fwin_window_title_set(E_Fwin_Page *page)
{
char buf[PATH_MAX];
char buf[PATH_MAX + sizeof("e_fwin::")];
const char *file;
if (!page) return;
@ -2028,7 +2028,7 @@ _e_fwin_file_open_dialog(E_Fwin_Page *page,
Efreet_Desktop *desk = NULL;
E_Fwin_Apps_Dialog *fad;
E_Fm2_Icon_Info *ici;
char buf[PATH_MAX];
char buf[PATH_MAX + sizeof("removable:")];
Eina_Bool has_default = EINA_FALSE;
int need_dia = 0, n = 0;;
@ -2700,7 +2700,7 @@ _e_fwin_op_registry_listener_cb(void *data,
const E_Fm2_Op_Registry_Entry *ere)
{
Evas_Object *o = data;
char buf[PATH_MAX];
char buf[4096];
char *total;
int mw, mh;

View File

@ -276,7 +276,7 @@ _gc_icon(const E_Gadcon_Client_Class *client_class __UNUSED__, Evas *evas)
static const char *
_gc_id_new(const E_Gadcon_Client_Class *client_class __UNUSED__)
{
static char buf[PATH_MAX];
static char buf[4096];
snprintf(buf, sizeof(buf), "%s.%d", _gc_class.name,
(eina_list_count(instances) + 1));

View File

@ -306,7 +306,7 @@ _e_mod_menu_volume_cb(void *data,
}
else
{
char buf[PATH_MAX];
char buf[PATH_MAX + sizeof("removable:")];
snprintf(buf, sizeof(buf), "removable:%s", vol->udi);
if (fm && ((fileman_config->view.open_dirs_in_place && evas_object_data_get(fm, "page_is_window")) ||
@ -321,7 +321,7 @@ static void
_e_mod_fileman_parse_gtk_bookmarks(E_Menu *m,
Eina_Bool need_separator)
{
char line[PATH_MAX];
char line[4096];
char buf[PATH_MAX];
E_Menu_Item *mi;
Efreet_Uri *uri;

View File

@ -53,7 +53,7 @@ static void
_opinfo_op_registry_listener(void *data, const E_Fm2_Op_Registry_Entry *ere)
{
Evas_Object *o = data;
char *total, buf[PATH_MAX];
char *total, buf[4096];
if (!o || !ere) return;

View File

@ -233,7 +233,7 @@ _gc_icon(const E_Gadcon_Client_Class *client_class __UNUSED__, Evas *evas)
static const char *
_gc_id_new(const E_Gadcon_Client_Class *client_class)
{
static char buf[PATH_MAX];
static char buf[4096];
snprintf(buf, sizeof(buf), "%s.%d", client_class->name,
eina_list_count(ibox_config->instances) + 1);

View File

@ -285,7 +285,7 @@ _il_home_desktop_run(Il_Home_Win *hwin, Efreet_Desktop *desktop)
Il_Home_Exec *exec;
Eina_List *l;
E_Border *bd;
char buff[PATH_MAX];
char buff[4096];
if ((!hwin) || (!desktop) || (!desktop->exec)) return;
EINA_LIST_FOREACH(exes, l, exec)

View File

@ -940,7 +940,7 @@ static void
_e_kbd_int_layout_parse(E_Kbd_Int *ki, const char *layout)
{
FILE *f;
char buf[PATH_MAX];
char buf[4096];
int isok = 0;
E_Kbd_Int_Key *ky = NULL;
E_Kbd_Int_Key_State *st = NULL;
@ -1010,7 +1010,7 @@ _e_kbd_int_layout_parse(E_Kbd_Int *ki, const char *layout)
(!strcmp(str, "capslock")) || (!strcmp(str, "altgr")))
{
char *p;
char label[PATH_MAX];
char label[4096];
if (sscanf(buf, "%*s %4000s", label) != 1) continue;
st = calloc(1, sizeof(E_Kbd_Int_Key_State));

View File

@ -113,7 +113,7 @@ _e_mod_kbd_device_ignore_load(void)
static void
_e_mod_kbd_device_ignore_load_file(const char *file)
{
char buff[PATH_MAX];
char buff[4096];
FILE *f;
/* can this file be opened */

View File

@ -8,7 +8,7 @@ static void _mixer_popup_timer_new(E_Mixer_Instance *inst);
static Eina_Bool _mixer_popup_timer_cb(void *data);
static E_Module *mixer_mod = NULL;
static char tmpbuf[PATH_MAX]; /* general purpose buffer, just use immediately */
static char tmpbuf[4096]; /* general purpose buffer, just use immediately */
static const char _conf_domain[] = "module.mixer";
static const char _name[] = "mixer";

View File

@ -4,7 +4,7 @@
#include "e_mod_main.h"
static E_Module *ofono_mod = NULL;
static char tmpbuf[PATH_MAX];
static char tmpbuf[4096];
const char _e_ofono_name[] = "ofono";
const char _e_ofono_Name[] = N_("Mobile Modems Info");

View File

@ -281,7 +281,7 @@ _gc_icon(const E_Gadcon_Client_Class *client_class __UNUSED__, Evas *evas)
static const char *
_gc_id_new(const E_Gadcon_Client_Class *client_class)
{
static char buf[PATH_MAX];
static char buf[4096];
snprintf(buf, sizeof(buf), "%s.%d", client_class->name,
eina_list_count(pager_config->instances) + 1);

View File

@ -107,7 +107,7 @@ static int _last_st_num = -1;
static E_Module *systray_mod = NULL;
static Instance *instance = NULL; /* only one systray ever possible */
static char tmpbuf[PATH_MAX]; /* general purpose buffer, just use immediately */
static char tmpbuf[4096]; /* general purpose buffer, just use immediately */
static Eina_Bool
_systray_site_is_safe(E_Gadcon_Site site)

View File

@ -301,7 +301,7 @@ _temperature_face_id_max(const Eina_Hash *hash __UNUSED__, const void *key, void
void
temperature_face_update_config(Config_Face *inst)
{
char buf[PATH_MAX];
char buf[8192];
if (inst->tempget_exe)
{

View File

@ -358,7 +358,7 @@ check(void)
FILE *f;
int ret = 0;
int temp = 0;
char buf[PATH_MAX];
char buf[4096];
#ifdef __FreeBSD__
int len;
size_t ftemp = 0;

View File

@ -32,7 +32,7 @@ wizard_page_show(E_Wizard_Page *pg __UNUSED__)
while (fgets(buf, sizeof(buf), fin))
{
Efreet_Desktop *desk;
char name[PATH_MAX], buf2[PATH_MAX], *p;
char name[4096], buf2[PATH_MAX], *p;
int n;
if (buf[0] == '#') continue;

View File

@ -540,7 +540,7 @@ _dlg_add_cb_ok(void *data __UNUSED__, E_Dialog *dlg)
{
E_Config_Dialog_Data *cfdata = dlg->data;
E_Config_XKB_Layout *cl;
char buf[PATH_MAX];
char buf[4096];
/* Configuration information */
const char *layout = e_widget_ilist_selected_value_get(cfdata->layout_list);
const char *model = e_widget_ilist_selected_value_get(cfdata->model_list);
@ -602,7 +602,7 @@ _cb_dlg_fill_delay(void *data)
E_Config_Dialog_Data *cfdata;
Eina_List *l;
E_XKB_Layout *layout;
char buf[PATH_MAX];
char buf[4096];
if (!(cfdata = data)) return ECORE_CALLBACK_RENEW;
@ -645,7 +645,7 @@ _cb_layout_select(void *data)
Eina_List *l;
const char *label;
int n;
char buf[PATH_MAX];
char buf[4096];
if (!(cfdata = data)) return;
@ -708,7 +708,7 @@ _cb_fill_delay(void *data)
E_Config_XKB_Layout *cl;
E_XKB_Model *model;
int n = 0;
char buf[PATH_MAX];
char buf[4096];
if (!(cfdata = data)) return ECORE_CALLBACK_RENEW;

View File

@ -258,7 +258,7 @@ _gc_label(const E_Gadcon_Client_Class *client_class __UNUSED__)
static const char *
_gc_id_new(const E_Gadcon_Client_Class *client_class)
{
static char buf[PATH_MAX];
static char buf[4096];
snprintf(buf, sizeof(buf), "%s.%d", client_class->name,
eina_list_count(instances) + 1);
@ -362,7 +362,7 @@ _e_xkb_cb_mouse_down(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSE
E_Menu_Item *mi;
Eina_List *l;
int dir;
char buf[PATH_MAX];
char buf[4096];
int grp = -1;
mi = e_menu_item_new(inst->lmenu);