]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
new conflicts with C++
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 8 Feb 2023 03:26:47 +0000 (21:26 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 8 Feb 2023 03:26:47 +0000 (21:26 -0600)
src/lib/server/request.c

index 6b7d5f91641fce9a8cb73f2c602e9a7a8bc02417..aeafb414837839a76bf43a1dd1e8fcd4cc5b6636 100644 (file)
@@ -546,18 +546,18 @@ request_t *_request_local_alloc(char const *file, int line, TALLOC_CTX *ctx,
  *  So it's wrong for anyone other than this function to play games with it.
  *
  * @param[in] request  to replace the state of.
- * @param[in] new      state to assign to the request.
- *                     May be NULL in which case a new state will
+ * @param[in] new_state        state to assign to the request.
+ *                     May be NULL in which case a new_state state will
  *                     be alloced and assigned.
  *
  * @return the fr_pair_t containing the old state list.
  */
-fr_pair_t *request_state_replace(request_t *request, fr_pair_t *new)
+fr_pair_t *request_state_replace(request_t *request, fr_pair_t *new_state)
 {
        fr_pair_t *old = request->session_state_ctx;
 
        fr_assert(request->session_state_ctx != NULL);
-       fr_assert(request->session_state_ctx != new);
+       fr_assert(request->session_state_ctx != new_state);
 
        fr_pair_remove(&request->pair_root->children, old);
 
@@ -565,11 +565,11 @@ fr_pair_t *request_state_replace(request_t *request, fr_pair_t *new)
         *      Save (or delete) the existing state, and re-initialize
         *      it with a brand new one.
         */
-       if (!new) MEM(new = fr_pair_afrom_da(NULL, request_attr_state));
+       if (!new_state) MEM(new_state = fr_pair_afrom_da(NULL, request_attr_state));
 
-       request->session_state_ctx = new;
+       request->session_state_ctx = new_state;
 
-       fr_pair_append(&request->pair_root->children, new);
+       fr_pair_append(&request->pair_root->children, new_state);
 
        return old;
 }