aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial
diff options
context:
space:
mode:
Diffstat (limited to 'src/tutorial')
-rw-r--r--src/tutorial/complex.c18
-rw-r--r--src/tutorial/funcs.c8
2 files changed, 13 insertions, 13 deletions
diff --git a/src/tutorial/complex.c b/src/tutorial/complex.c
index bf8b09eb17c..49317448216 100644
--- a/src/tutorial/complex.c
+++ b/src/tutorial/complex.c
@@ -49,7 +49,7 @@ complex_in(char *str)
result = (Complex *) palloc(sizeof(Complex));
result->x = x;
result->y = y;
- return (result);
+ return result;
}
/*
@@ -66,11 +66,11 @@ complex_out(Complex * complex)
char *result;
if (complex == NULL)
- return (NULL);
+ return NULL;
result = (char *) palloc(60);
sprintf(result, "(%g,%g)", complex->x, complex->y);
- return (result);
+ return result;
}
/*****************************************************************************
@@ -85,7 +85,7 @@ complex_add(Complex * a, Complex * b)
result = (Complex *) palloc(sizeof(Complex));
result->x = a->x + b->x;
result->y = a->y + b->y;
- return (result);
+ return result;
}
@@ -101,7 +101,7 @@ complex_abs_lt(Complex * a, Complex * b)
double amag = Mag(a),
bmag = Mag(b);
- return (amag < bmag);
+ return amag < bmag;
}
bool
@@ -110,7 +110,7 @@ complex_abs_le(Complex * a, Complex * b)
double amag = Mag(a),
bmag = Mag(b);
- return (amag <= bmag);
+ return amag <= bmag;
}
bool
@@ -119,7 +119,7 @@ complex_abs_eq(Complex * a, Complex * b)
double amag = Mag(a),
bmag = Mag(b);
- return (amag == bmag);
+ return amag == bmag;
}
bool
@@ -128,7 +128,7 @@ complex_abs_ge(Complex * a, Complex * b)
double amag = Mag(a),
bmag = Mag(b);
- return (amag >= bmag);
+ return amag >= bmag;
}
bool
@@ -137,7 +137,7 @@ complex_abs_gt(Complex * a, Complex * b)
double amag = Mag(a),
bmag = Mag(b);
- return (amag > bmag);
+ return amag > bmag;
}
int4
diff --git a/src/tutorial/funcs.c b/src/tutorial/funcs.c
index 71371f51609..42b3a3589ef 100644
--- a/src/tutorial/funcs.c
+++ b/src/tutorial/funcs.c
@@ -30,7 +30,7 @@ c_overpaid(TUPLE t, /* the current instance of EMP */
int
add_one(int arg)
{
- return (arg + 1);
+ return arg + 1;
}
char16 *
@@ -63,7 +63,7 @@ copytext(text *t)
(void *) VARDATA(t), /* source */
VARSIZE(t) - VARHDRSZ); /* how many bytes */
- return (new_t);
+ return new_t;
}
bool
@@ -76,6 +76,6 @@ c_overpaid(TUPLE t, /* the current instance of EMP */
salary = (int4) GetAttributeByName(t, "salary", &isnull);
if (isnull)
- return (false);
- return (salary > limit);
+ return false;
+ return salary > limit;
}