diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2015-08-31 12:32:48 -0700 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2015-08-31 12:32:48 -0700 |
commit | 4588327bb44af22e074e06442906a563075cf7c5 (patch) | |
tree | ccfbe5bc9a25da163c6c80dde4b1af1af4e8e1ca | |
parent | 5854f8bf9d03eba007f672ce90d416c9c2a8d1b1 (diff) |
304.128304.128
-rw-r--r-- | doc/version.mk | 2 | ||||
-rw-r--r-- | samples/version.mk | 2 | ||||
-rw-r--r-- | src/common-utils/common-utils.c | 17 | ||||
-rw-r--r-- | src/common-utils/common-utils.h | 9 | ||||
-rw-r--r-- | src/libXNVCtrl/libXNVCtrl.a | bin | 17746 -> 17746 bytes | |||
-rw-r--r-- | src/version.mk | 2 | ||||
-rw-r--r-- | version.mk | 2 |
7 files changed, 26 insertions, 8 deletions
diff --git a/doc/version.mk b/doc/version.mk index 9eef500..a437ca2 100644 --- a/doc/version.mk +++ b/doc/version.mk @@ -1 +1 @@ -NVIDIA_VERSION = 304.125 +NVIDIA_VERSION = 304.128 diff --git a/samples/version.mk b/samples/version.mk index 9eef500..a437ca2 100644 --- a/samples/version.mk +++ b/samples/version.mk @@ -1 +1 @@ -NVIDIA_VERSION = 304.125 +NVIDIA_VERSION = 304.128 diff --git a/src/common-utils/common-utils.c b/src/common-utils/common-utils.c index 1149a8e..cf00e00 100644 --- a/src/common-utils/common-utils.c +++ b/src/common-utils/common-utils.c @@ -200,6 +200,23 @@ char *nvstrtolower(char *s) /* + * nvasprintf() - implementation of asprintf() that checks return values; if an + * error occurs, an error is printed to stderr and exit is called. + * -- this function will only return on success. + */ +char *nvasprintf(const char *fmt, ...) +{ + char *str; + + NV_VSNPRINTF(str, fmt); + + return str; + +} /* nvasprintf() */ + + + +/* * nvfree() - frees memory allocated with nvalloc(), provided * a non-NULL pointer is provided. */ diff --git a/src/common-utils/common-utils.h b/src/common-utils/common-utils.h index 0a276d8..19ffa9a 100644 --- a/src/common-utils/common-utils.h +++ b/src/common-utils/common-utils.h @@ -45,6 +45,7 @@ void *nvrealloc(void *ptr, size_t size); char *nvstrdup(const char *s); char *nvstrndup(const char *s, size_t n); char *nvstrtolower(char *s); +char *nvasprintf(const char *fmt, ...); void nvfree(void *s); char *tilde_expansion(const char *str); @@ -93,9 +94,9 @@ do { \ va_list ap; \ int len, current_len = NV_FMT_BUF_LEN; \ \ - (buf) = malloc(current_len); \ - \ while (1) { \ + (buf) = nvalloc(current_len); \ + \ va_start(ap, fmt); \ len = vsnprintf((buf), current_len, (fmt), ap); \ va_end(ap); \ @@ -107,8 +108,8 @@ do { \ } else { \ current_len += NV_FMT_BUF_LEN; \ } \ - free(buf); \ - (buf) = malloc(current_len); \ + \ + nvfree(buf); \ } \ } \ } while (0) diff --git a/src/libXNVCtrl/libXNVCtrl.a b/src/libXNVCtrl/libXNVCtrl.a Binary files differindex 8f1dbd2..91ccb3f 100644 --- a/src/libXNVCtrl/libXNVCtrl.a +++ b/src/libXNVCtrl/libXNVCtrl.a diff --git a/src/version.mk b/src/version.mk index 9eef500..a437ca2 100644 --- a/src/version.mk +++ b/src/version.mk @@ -1 +1 @@ -NVIDIA_VERSION = 304.125 +NVIDIA_VERSION = 304.128 @@ -1 +1 @@ -NVIDIA_VERSION = 304.125 +NVIDIA_VERSION = 304.128 |