aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2013-03-20 15:22:40 +0000
committerMatt Fleming <matt.fleming@intel.com>2013-03-20 15:28:52 +0000
commita107cb3b6fa219cf5f65bef366c9b00b108e9a3a (patch)
treeec45acacb36222656bc19123ec078111391135fa
parentba45539416c804ed65a129ae3fd07f585f6a61ff (diff)
downloadsyslinux-a107cb3b6fa219cf5f65bef366c9b00b108e9a3a.tar.gz
syslinux-a107cb3b6fa219cf5f65bef366c9b00b108e9a3a.tar.xz
syslinux-a107cb3b6fa219cf5f65bef366c9b00b108e9a3a.zip
pxe: Fix compiler warnings and real bugsyslinux-5.10-pre2
commit 00a6f13139 ("Partially revert "pxe: Pass absolute path to pxe_chdir()"") introduced a bug by comparing the function 'url_type' with URL_SUFFIX. This resulted in the following warning, fs/pxe/pxe.c: In function ‘pxe_chdir’: fs/pxe/pxe.c:460:18: warning: comparison between pointer and integer [enabled by default] fs/pxe/pxe.c:458:19: warning: unused variable ‘path_type’ [-Wunused-variable] fs/pxe/pxe.c: In function ‘pxe_chdir’: fs/pxe/pxe.c:460:18: warning: comparison between pointer and integer [enabled by default] fs/pxe/pxe.c:458:19: warning: unused variable ‘path_type’ [-Wunused-variable] which unfortunately went unnoticed. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-rw-r--r--core/fs/pxe/pxe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fs/pxe/pxe.c b/core/fs/pxe/pxe.c
index 3e903367..4d694a1f 100644
--- a/core/fs/pxe/pxe.c
+++ b/core/fs/pxe/pxe.c
@@ -457,7 +457,7 @@ static int pxe_chdir(struct fs_info *fs, const char *src)
/* The cwd for PXE is just a text prefix */
enum url_type path_type = url_type(src);
- if (url_type == URL_SUFFIX)
+ if (path_type == URL_SUFFIX)
strlcat(fs->cwd_name, src, sizeof fs->cwd_name);
else
strlcpy(fs->cwd_name, src, sizeof fs->cwd_name);