Permalink
Browse files

replace NEEDLESS_RETURN(x) with NEEDLESS(return(x))

  • Loading branch information...
1 parent d49afc0 commit e6d58182d39863fc08fe91bf7efdfd2dde6f3262 @nigoroll nigoroll committed Dec 8, 2016
Showing with 6 additions and 8 deletions.
  1. +1 −1 bin/varnishd/cache/cache_fetch.c
  2. +2 −2 bin/varnishtest/vtc.c
  3. +1 −1 flint.lnt
  4. +0 −2 include/vdef.h
  5. +1 −1 lib/libvarnish/vsa.c
  6. +1 −1 lib/libvmod_directors/shard_hash.c
@@ -926,7 +926,7 @@ static enum fetch_step
vbf_stp_done(void)
{
WRONG("Just plain wrong");
- NEEDLESS_RETURN(F_STP_DONE);
+ NEEDLESS(return(F_STP_DONE));
}
static void __match_proto__(task_func_t)
@@ -241,7 +241,7 @@ macro_expand(struct vtclog *vl, const char *text)
VSB_destroy(&vsb);
vtc_log(vl, 0, "Macro ${%.*s} not found", (int)(q - p),
p);
- NEEDLESS_RETURN (NULL);
+ NEEDLESS(return (NULL));
}
VSB_printf(vsb, "%s", m);
free(m);
@@ -381,7 +381,7 @@ parse_string(const char *spec, const struct cmds *cmd, void *priv,
break;
if (cp->name == NULL) {
vtc_log(vl, 0, "Unknown command: \"%s\"", token_s[0]);
- NEEDLESS_RETURN;
+ NEEDLESS(return);
}
assert(cp->cmd != NULL);
View
@@ -95,7 +95,7 @@
///////////////////////////////////////////////////////////////////////
// <vdef.h>
--emacro(527, NEEDLESS_RETURN) // unreachable code
+-emacro(527, NEEDLESS) // unreachable code
///////////////////////////////////////////////////////////////////////
View
@@ -112,11 +112,9 @@
#define __state_variable__(varname) varname /*lint -esym(838,varname) */
#ifdef __SUNPRO_C
-#define NEEDLESS_RETURN {}
#define NEEDLESS(s) {}
#define __unused
#else
-#define NEEDLESS_RETURN return
#define NEEDLESS(s) s
#endif
@@ -336,7 +336,7 @@ VSA_Compare_IP(const struct suckaddr *sua1, const struct suckaddr *sua2)
}
WRONG("Just plain insane");
- NEEDLESS_RETURN(-1);
+ NEEDLESS(return(-1));
}
struct suckaddr *
@@ -101,7 +101,7 @@ _shard_hash_invalid(VCL_STRING s)
{
(void) s;
WRONG("invalid hash fp _ALG_E_ENVALID");
- NEEDLESS_RETURN(0);
+ NEEDLESS(return(0));
}
const hash_func shard_hash_f[_ALG_E_MAX] = {

0 comments on commit e6d5818

Please sign in to comment.