Mercurial > noffle
comparison src/database.c @ 169:39838e7d38be noffle
[svn] fix missing argument to snprintf
| author | enz |
|---|---|
| date | Wed, 28 Feb 2001 18:59:00 +0000 |
| parents | 3c71e28c8eef |
| children | ad4490c377a4 |
comparison
equal
deleted
inserted
replaced
| 168:cf2274194d38 | 169:39838e7d38be |
|---|---|
| 1 /* | 1 /* |
| 2 database.c | 2 database.c |
| 3 | 3 |
| 4 $Id: database.c 183 2000-07-25 12:14:54Z bears $ | 4 $Id: database.c 262 2001-02-28 18:59:00Z enz $ |
| 5 | 5 |
| 6 Uses GNU gdbm library. Using Berkeley db (included in libc6) was | 6 Uses GNU gdbm library. Using Berkeley db (included in libc6) was |
| 7 cumbersome. It is based on Berkeley db 1.85, which has severe bugs | 7 cumbersome. It is based on Berkeley db 1.85, which has severe bugs |
| 8 (e.g. it is not recommended to delete or overwrite entries with | 8 (e.g. it is not recommended to delete or overwrite entries with |
| 9 overflow pages). | 9 overflow pages). |
| 626 snprintf( name, MAXCHAR, "%s/data/articles.gdbm", Cfg_spoolDir() ); | 626 snprintf( name, MAXCHAR, "%s/data/articles.gdbm", Cfg_spoolDir() ); |
| 627 snprintf( tmpName, MAXCHAR, "%s/data/articles.gdbm.new", Cfg_spoolDir() ); | 627 snprintf( tmpName, MAXCHAR, "%s/data/articles.gdbm.new", Cfg_spoolDir() ); |
| 628 flags = GDBM_NEWDB | GDBM_FAST; | 628 flags = GDBM_NEWDB | GDBM_FAST; |
| 629 if ( ! ( tmpDbf = gdbm_open( tmpName, 512, flags, 0644, NULL ) ) ) | 629 if ( ! ( tmpDbf = gdbm_open( tmpName, 512, flags, 0644, NULL ) ) ) |
| 630 { | 630 { |
| 631 Log_err( "Error opening %s for read/write (%s)", errMsg() ); | 631 Log_err( "Error opening %s for read/write (%s)", name, errMsg() ); |
| 632 Db_close(); | 632 Db_close(); |
| 633 return FALSE; | 633 return FALSE; |
| 634 } | 634 } |
| 635 Log_inf( "Expiring articles" ); | 635 Log_inf( "Expiring articles" ); |
| 636 cntDel = 0; | 636 cntDel = 0; |
