diff options
author | Lars Buitinck <larsmans@gmail.com> | 2014-08-27 09:58:00 +0200 |
---|---|---|
committer | Lars Buitinck <larsmans@gmail.com> | 2014-08-27 09:58:31 +0200 |
commit | 7c6fd583a0a13649f3cdca3b0959ed1fdb4e85bf (patch) | |
tree | f6edd51bc5cc7e5e11cc6a20c4504e9136afbacd /numpy/linalg/lapack_lite/python_xerbla.c | |
parent | ad42ea6f614b7f9369a2a5756fea1dc66bc555d6 (diff) | |
download | numpy-7c6fd583a0a13649f3cdca3b0959ed1fdb4e85bf.tar.gz |
MAINT: linalg: use sizeof instead of magic constant
Allows changing the error message at some point.
Diffstat (limited to 'numpy/linalg/lapack_lite/python_xerbla.c')
-rw-r--r-- | numpy/linalg/lapack_lite/python_xerbla.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/numpy/linalg/lapack_lite/python_xerbla.c b/numpy/linalg/lapack_lite/python_xerbla.c index 2296cc53f..c4d2e484e 100644 --- a/numpy/linalg/lapack_lite/python_xerbla.c +++ b/numpy/linalg/lapack_lite/python_xerbla.c @@ -20,10 +20,9 @@ int xerbla_(char *srname, integer *info) { - const char* format = "On entry to %.*s" \ + static const char format[] = "On entry to %.*s" \ " parameter number %d had an illegal value"; - char buf[57 + 6 + 4]; /* 57 for strlen(format), - 6 for name, 4 for param. num. */ + char buf[sizeof(format) + 6 + 4]; /* 6 for name, 4 for param. num. */ int len = 0; /* length of subroutine name*/ #ifdef WITH_THREAD |