projects
/
selector.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added comments.
[selector.git]
/
selector.c
diff --git
a/selector.c
b/selector.c
index
4746d01
..
7f64eba
100644
(file)
--- a/
selector.c
+++ b/
selector.c
@@
-76,7
+76,7
@@
int attr_modeline, attr_focus_line, attr_error;
void *safe_malloc(size_t n) {
void *p = malloc(n);
void *safe_malloc(size_t n) {
void *p = malloc(n);
- if
(!p && n != 0) {
+ if(!p && n != 0) {
fprintf(stderr,
"selector: can not allocate memory: %s\n", strerror(errno));
exit(EXIT_FAILURE);
fprintf(stderr,
"selector: can not allocate memory: %s\n", strerror(errno));
exit(EXIT_FAILURE);
@@
-291,7
+291,8
@@
int add_and_get_previous_index(struct hash_table_t *hash_table,
/* We came back to our original code, which means that the table
is full */
if(code == start) {
/* We came back to our original code, which means that the table
is full */
if(code == start) {
- printf("Full hash table (that should not happen)\n");
+ fprintf(stderr,
+ "Full hash table (that should not happen)\n");
exit(EXIT_FAILURE);
}
}
exit(EXIT_FAILURE);
}
}
@@
-1222,7
+1223,7
@@
int main(int argc, char **argv) {
/* Here we come back to standard display */
/* Here we come back to standard display */
- if(
(key == KEY_ENTER || key == '\n')
) {
+ if(
key == KEY_ENTER || key == '\n'
) {
char *t;
char *t;