# | Line 38 | Line 38 | cm_alloc(int nrows, int ncols) | |
---|---|---|
38 | CMATRIX *cm; | |
39 | ||
40 | if ((nrows <= 0) | (ncols <= 0)) | |
41 | < | return(NULL); |
41 | > | error(USER, "attempt to create empty matrix"); |
42 | cm = (CMATRIX *)malloc(sizeof(CMATRIX) + | |
43 | 3*sizeof(COLORV)*(nrows*ncols - 1)); | |
44 | if (cm == NULL) |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |