Commit 51e8192c authored by Pavel Tvrdík's avatar Pavel Tvrdík
Browse files

Clearness of code of usage variable argument lists

All cases are exiting from BIRD, so the patch is a little useless,
however it will be good for copiage of this code.
parent e19d71a1
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ bug(const char *msg, ...)
  fputs("Internal error: ", stderr);
  vlog(msg, args);
  vfprintf(stderr, msg, args);
  va_end(args);
  exit(1);
}

@@ -48,5 +49,6 @@ die(const char *msg, ...)
  va_start(args, msg);
  cleanup();
  vlog(msg, args);
  va_end(args);
  exit(1);
}
+1 −0
Original line number Diff line number Diff line
@@ -507,6 +507,7 @@ cf_error(const char *msg, ...)
  va_start(args, msg);
  if (bvsnprintf(buf, sizeof(buf), msg, args) < 0)
    strcpy(buf, "<bug: error message too long>");
  va_end(args);
  new_config->err_msg = cfg_strdup(buf);
  new_config->err_lino = ifs->lino;
  new_config->err_file_name = ifs->file_name;
+2 −0
Original line number Diff line number Diff line
@@ -208,6 +208,7 @@ bug(const char *msg, ...)

  va_start(args, msg);
  vlog(L_BUG[0], msg, args);
  va_end(args);
  abort();
}

@@ -225,6 +226,7 @@ die(const char *msg, ...)

  va_start(args, msg);
  vlog(L_FATAL[0], msg, args);
  va_end(args);
  exit(1);
}