projects
/
platform
/
upstream
/
openblas.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd2da90
)
Fixed #261. Use strncmp instead of a comparing trick.
author
Zhang Xianyi
<traits.zhang@gmail.com>
Fri, 26 Jul 2013 15:43:54 +0000
(23:43 +0800)
committer
Zhang Xianyi
<traits.zhang@gmail.com>
Mon, 29 Jul 2013 08:48:35 +0000
(16:48 +0800)
driver/others/init.c
patch
|
blob
|
history
diff --git
a/driver/others/init.c
b/driver/others/init.c
index
4efc281
..
5da71ce
100644
(file)
--- a/
driver/others/init.c
+++ b/
driver/others/init.c
@@
-83,6
+83,7
@@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <dirent.h>
#include <dlfcn.h>
#include <unistd.h>
+#include <string.h>
#define MAX_NODES 16
#define MAX_CPUS 256
@@
-315,7
+316,7
@@
static int numa_check(void) {
}
while ((dir = readdir(dp)) != NULL) {
- if (
*(unsigned int *) dir -> d_name == 0x065646f6eU
) {
+ if (
strncmp(dir->d_name, "node", 4)==0
) {
node = atoi(&dir -> d_name[4]);