SQLite

Check-in [56d19f9fd7]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Remove an unnecessary conditional.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 56d19f9fd7b01d4ed5c3e7309977b43fedffee168c9760d3e3b7e885790f781e
User & Date: drh 2017-08-21 02:20:57.510
Context
2017-08-22
15:21
Fix error tests in seldom-used compile-time branches of the unix backend. (check-in: 885c2b44a4 user: drh tags: trunk)
2017-08-21
02:20
Remove an unnecessary conditional. (check-in: 56d19f9fd7 user: drh tags: trunk)
02:05
Minor optimization to sqlite3VdbeMemSetStr(). (check-in: 6538ef7b6b user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/expr.c.
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
Expr *sqlite3Expr(
  sqlite3 *db,            /* Handle for sqlite3DbMallocZero() (may be null) */
  int op,                 /* Expression opcode */
  const char *zToken      /* Token argument.  Might be NULL */
){
  Token x;
  x.z = zToken;
  x.n = zToken ? sqlite3Strlen30(zToken) : 0;
  return sqlite3ExprAlloc(db, op, &x, 0);
}

/*
** Attach subtrees pLeft and pRight to the Expr node pRoot.
**
** If pRoot==NULL that means that a memory allocation error has occurred.







|







771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
Expr *sqlite3Expr(
  sqlite3 *db,            /* Handle for sqlite3DbMallocZero() (may be null) */
  int op,                 /* Expression opcode */
  const char *zToken      /* Token argument.  Might be NULL */
){
  Token x;
  x.z = zToken;
  x.n = sqlite3Strlen30(zToken);
  return sqlite3ExprAlloc(db, op, &x, 0);
}

/*
** Attach subtrees pLeft and pRight to the Expr node pRoot.
**
** If pRoot==NULL that means that a memory allocation error has occurred.