[Cbe-oss-dev] [PATCH 4/4] libspe2: Replace arrays with pointers in spe_cpu_info_get
Kazunori Asayama
asayama at sm.sony.co.jp
Wed Apr 25 22:35:53 EST 2007
This patch replaces arrays with pointers for efficiency.
Signed-off-by: Kazunori Asayama <asayama at sm.sony.co.jp>
Index: libspe2-public/spebase/info.c
===================================================================
--- libspe2-public.orig/spebase/info.c
+++ libspe2-public/spebase/info.c
@@ -29,7 +29,7 @@
*/
int _base_spe_count_physical_cpus(int cpu_node)
{
- char buff[256] = "/sys/devices/system/cpu";
+ const char *buff = "/sys/devices/system/cpu";
DIR *dirp;
int ret = -2;
struct dirent *dptr;
@@ -70,7 +70,7 @@ int _base_spe_count_usable_spes(int cpu_
*/
int _base_spe_count_physical_spes(int cpu_node)
{
- char buff[256] = "/sys/devices/system/spu";
+ const char *buff = "/sys/devices/system/spu";
DIR *dirp;
int ret = -2;
struct dirent *dptr;
More information about the cbe-oss-dev
mailing list