Clang 6 caught a bogus comparison that was not previously caught; fix the build by correcting the comparison to correctly dereference the `char *` before comparing it with '\0'. PORTREVISION bumped because the comparison was erroneous and still successfully built everywhere but -HEAD. This patch is effectively from upstream. It will go away with the update to BOSSA 1.8, which requires a little more testing still. Approved by: antoine
20 lines
697 B
C++
20 lines
697 B
C++
--- src/Command.cpp.orig 2018-01-15 20:28:09 UTC
|
|
+++ src/Command.cpp
|
|
@@ -674,7 +674,7 @@ CommandMwb::invoke(char* argv[], int argc)
|
|
char* input = readline("? ");
|
|
if (!input)
|
|
return;
|
|
- if (input == '\0' ||
|
|
+ if (*input == '\0' ||
|
|
!argUint32(input, &value))
|
|
{
|
|
free(input);
|
|
@@ -777,7 +777,7 @@ CommandMww::invoke(char* argv[], int argc)
|
|
char* input = readline("? ");
|
|
if (!input)
|
|
return;
|
|
- if (input == '\0' ||
|
|
+ if (*input == '\0' ||
|
|
!argUint32(input, &value))
|
|
{
|
|
free(input);
|