diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2010-06-09 18:28:34 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2010-06-09 18:28:34 -0700 |
commit | d9408bb55f2c833de361cef1153c615d2874e7c6 (patch) | |
tree | 6f6847f0b59b11fe478480365fbd274a838a9a0c | |
parent | 862845aea785a1b7eb52b9e23850d113a2098310 (diff) | |
download | syslinux-d9408bb55f2c833de361cef1153c615d2874e7c6.tar.gz |
setadv: asprintf() doesn't return an error code
asprintf() doesn't return an error number, but a count of characters
(which we don't need.)
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r-- | libinstaller/setadv.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libinstaller/setadv.c b/libinstaller/setadv.c index 682b883e..c891b87f 100644 --- a/libinstaller/setadv.c +++ b/libinstaller/setadv.c @@ -183,8 +183,8 @@ int read_adv(const char *path, const char *cfg) struct stat st; int err = 0; - err = asprintf(&file, "%s%s%s", - path, path[0] && path[strlen(path) - 1] == '/' ? "" : "/", cfg); + asprintf(&file, "%s%s%s", + path, path[0] && path[strlen(path) - 1] == '/' ? "" : "/", cfg); if (!file) { perror(program); @@ -217,8 +217,8 @@ int read_adv(const char *path, const char *cfg) if (fd >= 0) close(fd); - if (file) - free(file); + + free(file); return err; } |